Update schema text and merge conditionals

This commit is contained in:
Andrew Burkett 2019-12-24 11:50:26 -08:00
parent f8dec72e98
commit 398c129411
2 changed files with 29 additions and 30 deletions

View File

@ -65,35 +65,34 @@ def run_configuration(config_filename, config, arguments):
'{}: Failed to acquire lock'.format(config_filename), error '{}: Failed to acquire lock'.format(config_filename), error
) )
if not encountered_error: if not encountered_error and 'create' in arguments:
if 'create' in arguments: try:
try: dispatch.call_hooks(
dispatch.call_hooks( 'ping_monitor',
'ping_monitor', hooks,
hooks, config_filename,
config_filename, monitor.MONITOR_HOOK_NAMES,
monitor.MONITOR_HOOK_NAMES, monitor.State.START,
monitor.State.START, global_arguments.dry_run,
global_arguments.dry_run, )
) command.execute_hook(
command.execute_hook( hooks.get('before_backup'),
hooks.get('before_backup'), hooks.get('umask'),
hooks.get('umask'), config_filename,
config_filename, 'pre-backup',
'pre-backup', global_arguments.dry_run,
global_arguments.dry_run, )
) dispatch.call_hooks(
dispatch.call_hooks( 'dump_databases',
'dump_databases', hooks,
hooks, config_filename,
config_filename, dump.DATABASE_HOOK_NAMES,
dump.DATABASE_HOOK_NAMES, global_arguments.dry_run,
global_arguments.dry_run, )
) except (OSError, CalledProcessError) as error:
except (OSError, CalledProcessError) as error: encountered_error = error
encountered_error = error yield from make_error_log_records(
yield from make_error_log_records( '{}: Error running pre-backup hook'.format(config_filename), error
'{}: Error running pre-backup hook'.format(config_filename), error
) )
if not encountered_error: if not encountered_error:

View File

@ -34,7 +34,7 @@ map:
example: true example: true
lock_client: lock_client:
type: bool type: bool
desc: Lock config when running borgmatic to prevent multiple instances from running simultaneously desc: Lock config when running borgmatic to prevent multiple instances from running simultaneously. Defaults to false.
example: true example: true
numeric_owner: numeric_owner:
type: bool type: bool