tldr: If I move the contents of the subfolder “data” of the restic repo elsewhere will runing “restic backup” still work? I don’t want to run other commands before I move the original contents back. I know that this is not officially supported. But given the current architecture of restic is there a good chance that this approach works?
A similar topic Fragmented storage? was discussed recently. But my case is different because I don’t want to have the full power of restic - I just want to run “restic backup”.
I have about 5 TB of data to backup. Nowadays the data only grows slowly, maybe 150gb a year. Storing all of it in the cloud is too expensive for me and the initial upload would take forever. So I rely on 3.5’’ external drives. I have one in my house and store the other off-site (at work).
About my off-site storage: I want store my data offsite pretty frequently but at the same time I want to only rarely transport the offsite disk: I mostly commute by train and 3.5’’ is pretty fragile and big. This off-site, secondary HDD is not needed for regular restores - it’s only needed in extreme circumstances like {fire|theft|cryptolocker|power surge|…} that kill my computer and the primary local backup on my first external HDD. The local backup to the first external HDD runs frequently, but it’s enough to run the secondary off-site backup e.g. once a week or month depending on the amount of new photos I have. In the unlikely case that it’s the only data I have left I can live with such a data loss.
The primary local backup will be made with a different software (so that my backup software is not a single point of failure).
I think about using restic for my off-site backup.
I have about 200gb of cloud storge with rsync and sftp support. I also have an unused small, external 250gb SSD that’s so small that I can even carry it in my pants pocket.
My idea is to use this SSD (or cloud storage) as a temporary helper for the off-site restic-backup:
- I make an initial backup on the secondary, external 3,5’’ HDD. Then I mirror this repo on the small SSD while excluding the content of the data folder. Then I store the HDD off-site.
- Then I regularly run restic backup to the repo on the SSD. When the SSD is nearly full or every couple of months I’d fetch the HDD and sync the SSD back to the HDD with
rsync -av SSD/ HDD/
. This rsync command wouldn’t delete any file from the HDD (destination) because I don’t have--delete
included. - Then I’d delete everything in the data dir from the repo of the SSD so that I could start the cycle again.
- If I ever need to restore something from the off-site HDD: I’d first sync the SSD to the HDD, then I’d restore from the HDD.
- I would only run “restic backup” to the SSD, all other commands such as “check”, “forget”, or “prune” would only be run against the HDD. After each of these commands I’d sync everything (except for data) back to the SSD.
I guess that this approach is not and will never be officially supported. But given the current architecture of restic is there a good chance that this approach works (and will work for the forseeable future)? Would it also work with a temporary sftp-cloud repo?
I just did a few small test backups and so far it seems to work.
Thanks for your help.