This commit is contained in:
Divyansh Singh 2023-03-25 01:50:47 +05:30
parent 1bc003560a
commit d6dfb8753a
5 changed files with 9 additions and 11 deletions

View file

@ -52,13 +52,7 @@ def run_compact(
threshold=compact_arguments.threshold,
)
else: # pragma: nocover
<<<<<<< HEAD
logger.info(
'{}: Skipping compact (only available/needed in Borg 1.2+)'.format(repository['path'])
)
=======
logger.info(f'{repository}: Skipping compact (only available/needed in Borg 1.2+)')
>>>>>>> f42890430c59a40a17d9a68a193d6a09674770cb
logger.info(f'{repository["path"]}: Skipping compact (only available/needed in Borg 1.2+)')
borgmatic.hooks.command.execute_hook(
hooks.get('after_compact'),
hooks.get('umask'),

View file

@ -22,7 +22,9 @@ def run_export_tar(
if export_tar_arguments.repository is None or borgmatic.config.validate.repositories_match(
repository, export_tar_arguments.repository
):
logger.info(f'{repository["path"]}: Exporting archive {export_tar_arguments.archive} as tar file')
logger.info(
f'{repository["path"]}: Exporting archive {export_tar_arguments.archive} as tar file'
)
borgmatic.borg.export_tar.export_tar_archive(
global_arguments.dry_run,
repository['path'],

View file

@ -255,7 +255,9 @@ def run_restore(
):
return
logger.info(f'{repository["path"]}: Restoring databases from archive {restore_arguments.archive}')
logger.info(
f'{repository["path"]}: Restoring databases from archive {restore_arguments.archive}'
)
borgmatic.hooks.dispatch.call_hooks_even_if_unconfigured(
'remove_database_dumps',

View file

@ -169,7 +169,7 @@ def run_configuration(config_filename, config, arguments):
return
encountered_error = error
yield from log_error_records(f'{repository_path}: Error pinging monitor', error)
yield from log_error_records(f'{repository["path"]}: Error pinging monitor', error)
if not encountered_error:
try:

View file

@ -19,7 +19,7 @@ def generate_configuration(config_path, repository_path):
.replace('ssh://user@backupserver/./sourcehostname.borg', repository_path)
.replace('- path: /mnt/backup', '')
.replace('label: local', '')
.replace('- /home', '- {}'.format(config_path))
.replace('- /home', f'- {config_path}')
.replace('- /etc', '')
.replace('- /var/log/syslog*', '')
+ 'storage:\n encryption_passphrase: "test"'