3 ms·
If you use restic/kopia, how are you managing scheduling and failure/success reporting together? That's one thing I can't seem to quite figure out with those s
by Saris 4y ago
If you use restic/kopia, how are you managing scheduling and failure/success reporting together?
That's one thing I can't seem to quite figure out with those solutions. I know there are scripts out there (or I could try my own), but that seems error-prone and could result in failed backups.
- antx 4y agoyeah, I scripted my backup jobs, and use good old email notifications to report. I expect an email every day. If I don't receive one, I know there's a problem with email delivery.
- dividuum 4y agoYou could use one of those services that expect a regular http heartbeat. I'm personally using uptimerobot for that. Within a .bat or .sh file, add a restic [...] && curl <heartbeat-url> and you'll get eventually notified if backup jobs fails too often.
- Saris 4y agoI've tinkered with that using healthchecks, but I don't really trust that I know what I'm doing when setting it up. Restic is also confusing to me with forgetting snapshots and doing cleanup, I don't understand why that isn't run as part of the backup (or is it? The docs aren't clear).
- deckard1 4y agono, you have to run "restic forget" with the policy you want (keep last X, last monthly Y, etc.) followed up with a "restic prune". Or you can pass "--prune" to the "forget" command I think. You don't always want to forget/prune snapshots. Especially if you're using a cloud service like B2. It can easily cost you more to prune than actual storage costs if you're not careful. See here: https://www.seanh.cc/2022/04/03/restic/#maintaining-your-backup https://www.seanh.cc/2022/04/03/restic/#maintaining-your-bac... and https://kdecherf.com/blog/2018/12/28/restic-and-backblaze-b2-short-cost-analysis-of-prune-operations/ https://kdecherf.com/blog/2018/12/28/restic-and-backblaze-b2...
- Saris 4y agoThanks for the links! That's helpful, the part about B2 makes sense.
- wbkang 4y agoYeah I had to invent my own. On Linux I used cron + email. You can setup postfix such that you use your personal gmail or whatever, then you will be able to do "echo message" | mail -s youremail.com to send an email. They (big email providers) always allow you to send an email as yourself to yourself. On Windows, I used the native task scheduler (with various triggers like time, lock workstation, idle and so on) and send an email using powershell, which can also send emails using SMTP.
- minimal-o 4y agoSame here. I have a wrapper script that runs restic commands. Whether I run it in a console or per crontab stdout/stderr is logged to a file and is emailed to me (in the crontab case). Nothing fancy yet, but it works and I am satisfied. Still pretty new to restic though. In another life I had a disaster recovery role and was using DLT for backup / restore of all the things, so ...