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): 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
def __init__(self): super().__init__() try: # FIXME: # self._logger = logger.setup(self._MODULE_NAME) self._logger = logger.setup( self._MODULE_NAME, # destination=logger.CONSOLE, level=logging.DEBUG) except Exception as _ex: _message = self._MESSAGES_LIST["e000001"].format(str(_ex)) _current_time = time.strftime("%Y-%m-%d %H:%M:%S") print("[FOGLAMP] {0} - ERROR - {1}".format(_current_time, _message), file=sys.stderr) sys.exit(1) self._config_from_manager = {} self._config = {} self._job = lib.Job() self._event_loop = asyncio.get_event_loop() self._foglamp_backup = "" self._foglamp_data = "" self._foglamp_data_etc = "" self._foglamp_root = "" self._backups_dir = "" self._semaphores_dir = "" # Creates the objects references used by the library lib._logger = self._logger lib._storage = self._storage