4 ms·
> Remember folks, test your backups. Since you mention it, I am seizing the opportunity to ask: how should borg backup be tested ? Can it be automated ?
by johnchristopher 3y ago
> Remember folks, test your backups.
Since you mention it, I am seizing the opportunity to ask: how should borg backup be tested ? Can it be automated ?
- jszymborski 3y agoIt's actually pretty simple using the check command [0]! borg check --verify-data REPOSITORY_OR_ARCHIVE You can add that to a cron job. Alternatively, I think the Vorta GUI also has a way to easily schedule it[1]. I'll add that one thing I like to do once in a blue-moon is to spin-up a VM and try to recover a few random files. While the check command checks that the data is there and theoretically recoverable, nothing really beats proving to yourself that you can, in a clean environment, recover your files. [0] https://borgbackup.readthedocs.io/en/stable/usage/check.html https://borgbackup.readthedocs.io/en/stable/usage/check.html [1] https://vorta.borgbase.com/ https://vorta.borgbase.com/
- johnchristopher 3y ago> It's actually pretty simple using the check command [0]! > borg check --verify-data REPOSITORY_OR_ARCHIVE Thanks ! I thought there were some more convoluted process but I couldn't picture out anything except extracting the whole archives and check up by hand.
- pdimitar 3y agoYes, I have a bunch of scripts that allow me to pick a Borg snapshot and then do stuff with it. One such action is `borg export-tar` that just creates a TAR file containing a full self-sufficient snapshot of your stuff. Then just listing the files in the archive is a not-bad way to find an obvious problem. Or straight up unpacking it. But if you're asking about a separate parity file that can be used to check and correct errors -- I haven't done that.