def __init__(self): super().__init__() if not self._logger: self._logger = logger.setup(self._MODULE_NAME, destination=_LOGGER_DESTINATION, level=_LOGGER_LEVEL) # Handled Restore command line parameters try: self._backup_id = super().get_arg_value("--backup-id") self._file_name = super().get_arg_value("--file") except Exception as _ex: _message = _MESSAGES_LIST["e000003"].format(_ex) _logger.exception(_message) raise exceptions.ArgumentParserError(_message) self._restore_lib = lib.BackupRestoreLib(self._storage, self._logger) self._job = lib.Job() self._force_restore = True """ Restore a backup doesn't exist in the backups table """ # Creates the objects references used by the library lib._logger = self._logger lib._storage = self._storage
def __init__(self, _storage): self._storage = _storage if not Backup._logger: Backup._logger = logger.setup(self._MODULE_NAME, destination=_LOGGER_DESTINATION, level=_LOGGER_LEVEL) self._backup_lib = lib.BackupRestoreLib(self._storage, self._logger)
def __init__(self): super().__init__() if not self._logger: self._logger = logger.setup(self._MODULE_NAME, destination=_LOGGER_DESTINATION, level=_LOGGER_LEVEL) self._backup = Backup(self._storage) self._backup_lib = lib.BackupRestoreLib(self._storage, self._logger) self._job = lib.Job() # Creates the objects references used by the library lib._logger = self._logger lib._storage = self._storage