So I’m not really a selfhoster per say - but I run 2 NAS at home and I am working my way toward it. I don’t really need my stuff open to the internet so I just use it on my LAN.
However I do have a lot of data, and I’m constantly backing things up. My question is - I have the following setup:
- Computer hard drives
- These backup to my NAS
- I have a separate HDD in an enclosure I plug into the NAS directly and copy my data onto every few months to put in my safe.
- Some cloud storage for very important smaller stuff (pictures)
My main question is - what is the best way to copy off new data from my NAS (Synology) to my “cold storage” drive, without recopying everything every time? is there a way to detect the files that exist on both and only copy new ones? I’ve always had this question when doing backups and it seems to always be overly complex.
You guys are very knowledgeable so I’m sure someone has dealt with this!
There are some useful options which can be found in the rsync manual although knowing which are redundant or conflicting can be tricky. If you run with the ‘n’ option first it will dry run, then you can remove the n to do the needful.
rsync -navhP --no-compress --ignore-existing --mkpath source dest -n dry-run, no changes are made -a is for archive, which recursively preserves ownership, permissions etc. -v is for verbose, so I can see what's happening (optional) -h is for human-readable, so the transfer rate and file sizes are easier to read (optional) -P show progress --no-compress as there's no lack of bandwidth between local devices --ignore-existing will skip updating files that exist on receiver -r is recursive, included in -a --mkpath will create the destination's path component