Ben Stern wrote:
rsync copies over almost everything too. I suggest using
rsync -Slap <src> <dest>
which preserves nearly everything. There are other useful flags, but a)
they're in the man page, and b) they would make the argument list less
humorous.
:-) A humorous argument list goes a long way toward memorability.
My standard invocation is:
rsync -ax <src> <dest>
The -l and -p flags are implied by -a. The -x flag limits rsync to a
single filesystem, which is important when backing up your root
directory (for example). I don't typically deal with sparse files, so
I've not been in the habit of using -S. Fortunately, there is no data
loss if you don't use -S, just a loss of space in the destination. I
generally also live without -H (--hard-links). The rsync manpage
indicates that -a preserves "almost everything"; hardlinks is the only
significant (IMO) thing that is not preserved by -a. Checking for hard
links slows rysnc down considerably which is why -a doesn't imply -H.
But the file content still makes it to the destination. Restoring from
such a backup leaves things almost 100% the same, but if the original
had a file linked by two different names, the restored filesystem will
have two independent files with identical content.
Michael Henry