Image of grog
Greg's how to do things with rsync
Greg's diary
Greg's home page
HOWTO index
Google

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.

Cloning file systems

cd oldfs
rsync -Havx . /newfs 2>/tmp/foo

Don't use -L here; it will create additional files from symlinks.

Backing up file systems

rsync -av --delete-after /src/$i $dumpfs/$me-$os

Backing up video

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

Valid XHTML 1.0!

$Id: rsync.php,v 1.6 2023/10/18 03:24:37 grog Exp $