Utilisation de rsync

Petit topo rapide sur l'usage de rsync pour sauvegader / synchroniser des données.

rsync [options] SRC [DEST]
Syntaxe de base.
Options principales de rsync
Options Description
-v increase verbosity
-a archive mode; equals -rlptgoD (no -H,-A,-X)
-c skip based on checksum, not mod-time & size
-r recursive
-u skip files that are newer on the receiver
-d transfer directories without recursing
-l copy symlinks as symlinks
-L transform symlink into referent file/dir
-k transform symlink to dir into referent dir
-t preserve modification times
-P same as ‐-partial ‐-progress
‐-delete delete extraneous files from dest dirs
‐-force force deletion of dirs even if not empty
‐-progress show progress during transfer
-z, ‐-compress compress file data during the transfer
‐-exclude=PATTERN exclude files matching PATTERN
‐-exclude-from=FILE read exclude patterns from FILE
‐-out-format=FORMAT output updates using the specified FORMAT
‐-log-file=FILE log what we're doing to the specified FILE
‐-log-file-format=FMT log updates using the specified FMT
-n, ‐-dry-run perform a trial run with no changes made
rsync -vcrLktz --delete --force --progress <SRC> <DEST>
Commande de base en transformant les symlinks de SRC en fichiers / dossiers dans DEST