rsync home and server/nas

Ditching the idea of a NAS for a HTPC that will double as a backup server I have started investigating rsync instead of using RAID setup.

Having my data in two places should be easy enough.

note: use automount/autofs and not /etc/fstab – boot timeout sucks!

there are no user permissions on my nas so now we can try to
[judo@media ~]$ rsync -avz /plex/test/ /mnt/nas/test/ –dry-run

(remove –dry-run and -v once everything works)

-v means “verbose” btw.
–dry-run is a “what if” switch to test what would happen
-z means “compress” which is useful if at least one of the involved hosts is remote. (wonder if that applies/helps in a LAN…)

-a is a “archive” flag, it allows copying files recursively an (-r) and it also preserves symbolic links, file permissions, user & group ownerships and timestamps blah blah.. USEFUL!

consider adding -u for “skip newer” (skip files that were copied already.. only if you want the data on the NAS to be leading. NEED TO TEST THIS… does it check timestamps? filenames? checksums? file size?

questions:
– using which file system for that? NFS? CIFS?
– SSH or other transfer?
– flags for that? -avzhe
– different user for all that? permissions?

how to automate? using crontab?
*/5 * * * * rsync -avzhe ssh root@webserver.example.com:/var/www/ /var/www/