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

Using a Linux server to route packets between two private networks

PHP Fatal error: Class 'JFactory' not found

KVM & Qemu