I’ve been using restic backups for my various hosts with good success. I have a set of files that I would like to archive permanently and I’m curious if this is something I should do in restic and if so what a recommended workflow might look like.
An example of files I would like to backup:
Also for reference, this is what my current restic backup script looks like (run once per hour or per day depending on host):
/usr/bin/restic backup -q -x --exclude-caches --exclude-file /.resticignore $backup_paths \
&& /usr/bin/restic forget -q --keep-daily 7 --keep-weekly 8 --keep-monthly 24 --keep-yearly unlimited --host "$HOSTNAME" --prune \
&& /usr/bin/restic prune
I think if I were to use rclone, I would create an encrypted target and just incrementally add files to it and then rclone sync this around for redundancy. Personally I think this is relatively clean and simple in that all of your archived files are in a single “snapshot” and organized separately in rclone which could be different from the source path used as I think is forced in restic.
Some considerations for using restic for one-shot archival purposes:
- Does it make sense to use a separate repo for archival only? It could be the case that some of the files I want to archive may be already included in my host backup repos so dedup is a consideration?
- If I don’t make it a separate repo, then I will have archival snapshots containing perhaps 1 single file littered about my snapshots which may also make it more difficult to visualize given periodic snapshots from 3+ hosts already.
- Snapshot merging apparently isn’t supported in restic so indeed I believe I will end up with many separate snapshots.
- Is it possible to backup files and rewrite their paths so for example my snapshots could force all files irrespective of their source paths to be in say /?
- How can I 100% prevent their accidental auto pruning based on lifetime? I use
--keep-yearly unlimitedto prevent any sort of auto pruning but not sure if this is the recommended way of doing it.