Esempio n. 1
0
def restore_apps(storage, bucket):
    """ Triggers a restore of apps for the current deployment. Retrieves the
  source code from the backup location on the filesystem.

  Args:
    storage: A str, one of the StorageTypes class members.
    bucket: A str, the name of the remote bucket where the backups are stored.
  Returns:
    True on success, False otherwise.
  """
    return BR.app_restore(storage, bucket_name=bucket)
Esempio n. 2
0
def restore_apps(storage, bucket):
  """ Triggers a restore of apps for the current deployment. Retrieves the
  source code from the backup location on the filesystem.

  Args:
    storage: A str, one of the StorageTypes class members.
    bucket: A str, the name of the remote bucket where the backups are stored.
  Returns:
    True on success, False otherwise.
  """
  return BR.app_restore(storage, bucket_name=bucket)
Esempio n. 3
0
    def do_app_restore(self, storage, path):
        """ Top level function for restoring source code.

    Args:
      storage: A str, one of the StorageTypes class members.
      path: A str, the name of the backup file to be created.
    Returns:
      A JSON string to return to the client.
    """
        if not backup_recovery_helper.app_restore(storage, path):
            return self.bad_request("Source code restore failed!")
        logging.info("Successful source code restore!")
        return json.dumps({'success': True, 'reason': ''})
Esempio n. 4
0
  def do_app_restore(self, storage, path):
    """ Top level function for restoring source code.

    Args:
      storage: A str, one of the StorageTypes class members.
      path: A str, the name of the backup file to be created.
    Returns:
      A JSON string to return to the client.
    """
    if not backup_recovery_helper.app_restore(storage, path):
      return self.bad_request("Source code restore failed!")
    logging.info("Successful source code restore!")
    return json.dumps({'success': True, 'reason': ''})