Rsync

From ElectroDragon
Jump to: navigation, search

Basic syntax of rsync command

rsync options source destination
  • Some common options used with rsync commands
  • -v : verbose
  • -r : copies data recursively (but don’t preserve timestamps and permission while transferring data
  • -a : archive mode, archive mode allows copying files recursively and it also preserves symbolic links, file permissions, user & group ownerships and timestamps
  • -z : compress file data
  • -h : human-readable, output numbers in a human-readable format
  • copy local file from /home/coremail to /cmbak
rsync -avSH /home/coremail/ /cmbak/

reference: http://coolnull.com/1899.html