rsync -a --delete -Pau INDIR [INDIRS...] OUTDIR
-a
: Archive mode copy the access rights.--delete
: Remove files if there aren't in the source directory anymore.--progress
: Display the progression.--partial
: keep partially transferred files-u
: Update only file with modification on source.--hard-links
: Create hardlinks to the destination directory like the source one.--inplace
: Write directly the file instead of temp one.--append
: Write destinations file without replace it (checksum verification).
-a
implies :
-r
--recursive
-l
--links
: Recreate symlink-p
--perms
: Copy files permissions (chmod
)-t
--times
: Preserve file timestamps (optimising the comparison)-g
--group
: Copy group owner (gid
)-o
--owner
: Copy user owner (uid
)-D
:--devices
--specials
--devices
: Transfert devices files (like on/dev
directory)--specials
: Transfert special file such as sockets or fifo
Warning
Traling slash are important!
BSD rules :
dir/
=> dest
dir
=> dest/dir