Illegal option combination is permitted #59

Closed
opened 2018-04-17 11:12:03 +00:00 by pocal · 5 comments

While creating my first Borgmatic config.yaml file, I tried this:

   checks:
#         - disabled
        - repository
#        - archives

and got this error:

/storage/Backups/Borg: Creating archive (dry run; not making any changes)
/storage/Backups/Borg: Running consistency checks
--repository-only contradicts --first, --last, --prefix and --verify-data arguments.
/etc/borgmatic/config.yaml: Running command for on-error hook
Tue 17 Apr 11:46:53 BST 2018 - Error while creating a backup.
Command '('borg', 'check', '/storage/Backups/Borg', '--repository-only', '--last', '2', '--lock-wait', '5', '--info')' returned non-zero exit status 2.

If this combination is illegal, the consistency check should notice before running Borg.

While creating my first Borgmatic config.yaml file, I tried this: ``` checks: # - disabled - repository # - archives ``` and got this error: ``` /storage/Backups/Borg: Creating archive (dry run; not making any changes) /storage/Backups/Borg: Running consistency checks --repository-only contradicts --first, --last, --prefix and --verify-data arguments. /etc/borgmatic/config.yaml: Running command for on-error hook Tue 17 Apr 11:46:53 BST 2018 - Error while creating a backup. Command '('borg', 'check', '/storage/Backups/Borg', '--repository-only', '--last', '2', '--lock-wait', '5', '--info')' returned non-zero exit status 2. ``` If this combination is illegal, the consistency check should notice before running Borg.
witten added the
bug
label 2018-05-19 23:23:21 +00:00
Owner

Thanks for reporting this! What I'll do is just avoid passing the --last option to Borg in the case that the archives check isn't being run. My thinking is that you still might want it in your config file even if it doesn't take effect.. You might be commenting out - archives temporarily or whatever.

Thanks for reporting this! What I'll do is just avoid passing the `--last` option to Borg in the case that the archives check isn't being run. My thinking is that you still might want it in your config file even if it doesn't take effect.. You might be commenting out `- archives` temporarily or whatever.
Author

OK, that's reasonable. Maybe add a comment in the output to warn that checks are not being run.

OK, that's reasonable. Maybe add a comment in the output to warn that checks are not being run.
Owner

Good call. Just completed this in master. It'll go out with the next release. Thanks again.

Good call. Just completed this in master. It'll go out with the next release. Thanks again.
Owner

This has just been released as part of borgmatic 1.2.0!

This has just been released as part of borgmatic 1.2.0!
Author

Thanks, I'll check it out.

Thanks, I'll check it out.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#59
No description provided.