UnixServerAdmin

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)

 

Advertisements

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

cPanel: rsync error

If you have issued the following command

# rsync -av rsync://rsync.cpanel.net/scripts /scripts;chown 0.0 /scripts

And resulting in the  following error message:

rsync: failed to connect to rsync.cpanel.net: Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(94)

Here is the fix

cPanel has discontinued the use of rsync and all syncs need to be done using using the following command. Run these commands as root:

# /scripts/cpanelsync httpupdate.cpanel.net /cpanelsync/RELEASE/scripts /scripts

December 19, 2011 Posted by | cPanel | , | Leave a comment

Protected: Backup_rsync.sh

This content is password protected. To view it please enter your password below:

December 6, 2011 Posted by | Shell Script, Tips & Tricks | , , | Enter your password to view comments.

Protected: backup_remote.sh

This content is password protected. To view it please enter your password below:

May 7, 2011 Posted by | Shell Script | , , | Enter your password to view comments.