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.

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

Comments

Popular posts from this blog

KVM & Qemu

PHP Fatal error: Class 'JFactory' not found

docker.errors.APIError: 400 Client Error client is newer than server