Ejemplo n.º 1
0
 def get_backup(self, backup_id):
     try:
         backup = persistence.get_backup(backup_id)
         return str(backup)
     except Exception, e:
         msg = "Error while trying to get backup %s: %s" % (backup_id, e)
         logger.error(msg)
         logger.error(traceback.format_exc())
         send_api_error("get-backup", e)
         return error_response(msg)
 def get_backup(self, backup_id):
     try:
         backup = persistence.get_backup(backup_id)
         return str(backup)
     except Exception, e:
         msg = "Error while trying to get backup %s: %s" % (backup_id, e)
         logger.error(msg)
         logger.error(traceback.format_exc())
         send_api_error("get-backup", e)
         return error_response(msg)
Ejemplo n.º 3
0
 def expire_backup(self, backup_id):
     try:
         exp_man = self.backup_system.backup_expiration_manager
         backup = persistence.get_backup(backup_id)
         result = exp_man.expire_backup(backup, force=True)
         return document_pretty_string(result)
     except Exception, e:
         msg = ("Error while trying to expire backup %s: %s" %
                (backup_id, e))
         logger.error(msg)
         logger.error(traceback.format_exc())
         send_api_error("expire-backup", e)
         return error_response(msg)
 def expire_backup(self, backup_id):
     try:
         exp_man = self.backup_system.backup_expiration_manager
         backup = persistence.get_backup(backup_id)
         result = exp_man.expire_backup(backup, force=True)
         return document_pretty_string(result)
     except Exception, e:
         msg = ("Error while trying to expire backup %s: %s" %
                (backup_id, e))
         logger.error(msg)
         logger.error(traceback.format_exc())
         send_api_error("expire-backup", e)
         return error_response(msg)