I was recently asked by a fried to document my backup routine. Basically I use restic, and b2 cloud storage from backblaze. With a little tinkering and the 'pass' command (which I havent' used yet!), I can backup my ENTIRE homedirectory with dedupe, compression, encryption, and snapshots. I can remotely mount them with fuse (meaning I can just go into a snapshot, mount it, and then select a file from my cli!). I recently used it and it restored 90GB in 10 minutes. It also compresses.
Here is the 'ultimate secure' guide to doing it, or here is my more lazy way until I get pass working:
- create a new api key in b2
- in my .config.fish file add the
set -gx B2_ACCOUNT_ID YOURB2ACCOUNT set -gx RESTIC_REPOSITORY b2:<YOURBUCKETNAME> set -gx B2_ACCOUNT_KEY <YOUR ACCOUNT KEY> set -gx RESTIC_PASSWORD <YOURPASSWORD>
These are for the fish shell, so if you are using bash change accordingly. The create the following file:
resticexclude.txt this will have the exclusions and diretories you DON'T want to backup. I usually add .cache, Downloads, etc. to it. Obviously Dont let others get into your homedir, as they will have the copy of the api key (which you limited to ONLY your restic one, right?)
Finally create an abbreviation
abbr -a -- rbu 'restic backup /home/<yourhomedir> --exclude-file /home/<yourhomedir>/resticexclude.txt' --compression max --exclude-caches
Finally, you can remotely initialize the repo with the following command (probably should do this FIRST!):
restic init --repository-version 2
Thats about it. FOr 100GB I pay $0.80/month.