Support for using tilde in repository paths to reference home directory.

This commit is contained in:
Dan 2017-11-02 21:34:04 -07:00
parent 63c7241aec
commit f83346b9b3
3 changed files with 7 additions and 5 deletions

5
NEWS
View file

@ -1,6 +1,7 @@
1.1.10.dev0 1.1.10.dev0
* Passing several Unix signals through to child processes like Borg. This means that Borg now * Pass several Unix signals through to child processes like Borg. This means that Borg now properly
properly shuts down if borgmatic is terminated (e.g. due to a system suspend). 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 1.1.9
* #16, #38: Support for user-defined hooks before/after backup, or on error. * #16, #38: Support for user-defined hooks before/after backup, or on error.

View file

@ -97,7 +97,8 @@ def run_configuration(config_filename, args): # pragma: no cover
create.initialize(storage) create.initialize(storage)
hook.execute_hook(hooks.get('before_backup'), config_filename, 'pre-backup') 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: if args.prune:
logger.info('{}: Pruning archives'.format(repository)) logger.info('{}: Pruning archives'.format(repository))
prune.prune_archives(args.verbosity, repository, retention, remote_path=remote_path) prune.prune_archives(args.verbosity, repository, retention, remote_path=remote_path)

View file

@ -31,8 +31,8 @@ map:
seq: seq:
- type: scalar - type: scalar
desc: | desc: |
Paths to local or remote repositories (required). Multiple repositories are Paths to local or remote repositories (required). Tildes are expanded. Multiple
backed up to in sequence. repositories are backed up to in sequence.
example: example:
- user@backupserver:sourcehostname.borg - user@backupserver:sourcehostname.borg
exclude_patterns: exclude_patterns: