rsync
2013-03-21.
Category & Tags:
Soft&Skills
Soft&Skills
Usage:
rsync -avhuz /path/to/src_folder/ [email protected]:/home/username/path/to/dest_folder/
alias rsyncBackupCompareAttr='rsync -avhuz --progress --delete --log-file=rsyncBackupLog.txt'
alias rsyncBackupIgnoreAttr='rsync -avhuz --no-perms --no-owner --no-group --progress --delete --log-file=rsyncBackupLog.txt'
OBS:
rsync folderA folderB
will cp folderA into,under folderB.
rsync folderA/ folderB/
will cp folderA’s content into folderB.
Thus, /
s after both folderX
are mandatory.
Becareful with -u
: it will ignore the dest file with newer timestamp.