2 ms·
I couldn't find any borg configuration to schedule and resume after sleep. Unless that changed, how does it fit my requirements?
by izacus 6y ago
I couldn't find any borg configuration to schedule and resume after sleep. Unless that changed, how does it fit my requirements?
- deleted 6y ago[deleted]
- hiq 6y agoRegarding sleep that would be the role of e.g. systemd (or whatever you have on your system) and you'd have to write a service unit handling that (although I'm not sure what you'd want exactly, if you have a program running when you put your computer to sleep, it'll still be running once it resumes, so not much to do). Regarding schedule that could be part of the service, but a simple cronjob can also do the trick depending on what you want exactly.
- StavrosK 6y agoYou can just interrupt the backup on sleep and start it again on wake. It'll resume, though if nothing's changed it'll probably take a bit of time to realize that it doesn't need to sync anything.
- ckcheng 6y agoYeah, I just tried that and it works with restic, at least in my quick tests of it: slept the computer with restic in mid-scan, and it was ok resuming on wake a few minutes later. A simple crontab entry to run restic every hour should work. I tested it running every minute and that worked fine. If there's a chance that the laptop would sleep and stop restic in a mid-backup that was started by cron, then this[1] suggestion would probably be sufficient to work around that: [1]: https://news.ycombinator.com/item?id=25552894 https://news.ycombinator.com/item?id=25552894 What I'm not sure about is whether restic would resume backing up a large file from where it left off if interrupted, or if it must re-backup the entire file.