Rsync source -> dest properly
What to run:
rsync -HPva --delete <source>/ <dest>/
(tip for remembering: "Arr! Sync! Hey, Pretty view, eh? Do Eet")
why:
-H (--hard-links) sync any hard links as hard links, as distinct from files, at the destination-Pv (--partial --progress --verbose) gives you a nicely verbose output with a reasonable way to estimate remaining time (sometimes)-a (--archive) "equals -rlptgoD", that is "please just work"--delete removes files from the destination that are not present on the source (it doesn't delete from the source)Notes:
<source> and <dest>ination paths to ensure directories are created the way you expectSometimes good option:
-z (--compress)