Saturday, 24 May 2014

Multiple Rsync[parallel] during data transfer

Sometimes the data transfer is very slow due to network connections.
At that time, we use parallel rsync to transfer the data to other server efficiently.

export SRCDIR="/home/."; -->Source Directory
export DESTDIR=""; --> Destination Directory
export THREADS="8";
rsync -lptgoDvzd $SRCDIR $DESTDIR; --> transfer the folders & sub-folders first.
find . -type f | xargs -n1 -P$THREADS -I% rsync -az % $DESTDIR; -->rsync files in multiple process.

No comments:

Post a Comment