|
|
rsync is a very powerful program, but it contains a maze of twisty little options, all different, and sometimes I find I've messed things up long after it happened. I'm writing down typical incantations here.
Don't use -L here; it will create additional files from symlinks.
I still have great difficulty deciding where rsync puts the files. It's far too easy for it to put them one level deeper in the hierarchy than intended. That's the reason for referring to the source directory as . (dot) rather than by name.
rsync -Hav --delete-after /src/$i $dumpfs/$me-$os
Until September 2024 I didn't include the H option, but it seems wrong not to.
rsync > /tmp/rsyncerrs -LHav --partial --delete-after /spool/Already /spool/Docco destination
# or
cd /teevee/spool
# don't try to sync .snap or ..sujournal
rsync -LHav --partial --delete-after * /spool | tee /tmp/rsyncerrs
All file systems except the last are sources. destination is the base file system, and the files will include the path names of the sources with the initial / stripped
Greg's home page | Greg's diary | Greg's photos | Copyright |