Server Administration & Management

Rsync Tips

Synchronizing data beetween two directories

# rsync -rv <src> <dst> –progress

Rsync two directories with filtered extensions

# rsync -rv –include ‘*/’ –include ‘*.txt’ –exclude ‘*’ srcDir/ desDir/

Rsync a directory excluding pesky .svn dirs

# rsync -rv –exclude .svn src/dir/ dest/dir/

Sync Source Directory to Destination Directory

# rsync -avzE -e  –process /var/www/html/deploy root@X.X.X.X/backup/testing/project

# rsync -avzE  /var/www/html/deploy root@X.X.X.X://backup/testing/project/

src :- source
dst :- destination
-v :- increase Verbosity
-a :- archive mode
-r :- recurse into directories
-e :- Specify remote shell to use
-r :- for recursive (if you want to copy entire directories)
–process :- to show a progress bar)


January 15, 2012 Posted by | Tips & Tricks, Unix/Linux | , , | Leave a comment