rsync to NAS copies everything every time
Why don't you try:
rsync -a /home/user/source /media/nas/destination
-a
is convenience option specifically for archiving. It works for me all the time.
Here is what man page says:
-a, --archive archive mode; same as -rlptgoD (no -H)
You need to add -t
(or --times
) to your rsync
command-line, so that rsync
will preserve file modification times at the destination. That will allow subsequent rsync
runs to skip all files with identical sizes and modification times. Also, don't bother with the -c
option, unless you know for certain that your destination does not (or cannot) maintain accurate file modification times, for some reason.
You very likely want to be using the -u
flag, which tells rsync not to send files that exist in the destination and that either have newer modified times in the destination or have equal modified times and sizes in both places.
In addition to using the -a flag, you should also check the man page for other options. The problem with using a simple mirror backup strategy, is that any corrupted file will be copied over and corrupt your backup as well. One of the rsync options is to backup a copy of the changed files on the destination side, which is much safer.
I highly recommend to take a look at BackupPC as well. It uses rsync and has Debian/Ubuntu packages. It will handle incrementals properly, collating identical files, and compressing everything to save space.