diff --git a/NEWS b/NEWS index 49afddec..d64e2830 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ 1.1.10.dev0 - * Passing several Unix signals through to child processes like Borg. This means that Borg now - properly shuts down if borgmatic is terminated (e.g. due to a system suspend). + * Pass several Unix signals through to child processes like Borg. This means that Borg now properly + shuts down if borgmatic is terminated (e.g. due to a system suspend). + * #29: Support for using tilde in repository paths to reference home directory. 1.1.9 * #16, #38: Support for user-defined hooks before/after backup, or on error. diff --git a/borgmatic/commands/borgmatic.py b/borgmatic/commands/borgmatic.py index 1d66c26a..ad3e2972 100644 --- a/borgmatic/commands/borgmatic.py +++ b/borgmatic/commands/borgmatic.py @@ -97,7 +97,8 @@ def run_configuration(config_filename, args): # pragma: no cover create.initialize(storage) hook.execute_hook(hooks.get('before_backup'), config_filename, 'pre-backup') - for repository in location['repositories']: + for unexpanded_repository in location['repositories']: + repository = os.path.expanduser(unexpanded_repository) if args.prune: logger.info('{}: Pruning archives'.format(repository)) prune.prune_archives(args.verbosity, repository, retention, remote_path=remote_path) diff --git a/borgmatic/config/schema.yaml b/borgmatic/config/schema.yaml index c70cba09..8cfa32f2 100644 --- a/borgmatic/config/schema.yaml +++ b/borgmatic/config/schema.yaml @@ -31,8 +31,8 @@ map: seq: - type: scalar desc: | - Paths to local or remote repositories (required). Multiple repositories are - backed up to in sequence. + Paths to local or remote repositories (required). Tildes are expanded. Multiple + repositories are backed up to in sequence. example: - user@backupserver:sourcehostname.borg exclude_patterns: