Add snapper-sync to synchronize the highest snapshot number#1128
Add snapper-sync to synchronize the highest snapshot number#1128jameslai-dev wants to merge 5 commits intoopenSUSE:masterfrom
snapper-sync to synchronize the highest snapshot number#1128Conversation
|
Please move the new files to the snapper-backup package. Only when that is installed the new service makes sense. |
4e096f5 to
c8956dd
Compare
|
Thanks for your feedback. The A few minor changes have been made:
Please take a look! |
|
I just realized there is a drop-in mechanism for overriding an existing service, but I haven't used it before: https://wiki.archlinux.org/title/Systemd#Drop-in_files Would it be appropriate to include drop-in files in Snapper Backup to override |
|
Yes, drop-in overrides look like a good idea. |
To resolve the potential snapshot number collision after a system restore, as mentioned in #1105 (comment), this pull request adds a
snapper-syncscript to synchronize the highest snapshot number between the source and the backup target. The script can be triggered automatically by enablingsnapper-sync.service.Detailed changes:
script/snapper-sync: A script to synchronize the highest snapshot number acrosssnapperdandsnbk.This script does nothing ifThe script requires bothsnbkis not installed.snapperandsnbkto be installed.data/snapper-sync.service: An optional systemd service to triggersnapper-syncautomatically.data/boot.timeranddata/timeline.timerto optionally depend onsnapper-sync.service.snapper.spec.inanddist/debianto includesnapper-syncrelated files in thesnappersnapper-backuppackage.snapper-syncin thesnappersnapper-backupmanual.