Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /bin/bash
- # SETUP OPTIONS
- export SRCDIR="/folder/path"
- export DESTDIR="/folder2/path"
- export THREADS="8"
- # RSYNC TOP LEVEL FILES AND DIRECTORY STRUCTURE
- rsync -lptgoDvzd $SRCDIR/ /$DESTDIR/
- # OVER SSH #rsync -lptgoDvzd -e 'ssh -c arcfour' $SRCDIR/ remotehost:/$DESTDIR/
- # FIND ALL FILES AND PASS THEM TO MULTIPLE RSYNC PROCESSES
- cd $SRCDIR; find . -type f | xargs -n1 -P$THREADS -I% rsync -az % /$DESTDIR/%
- # OVER SSH #cd $SRCDIR; find . -type f | xargs -n1 -P$THREADS -I% rsync -az -e 'ssh -c arcfour' % remotehost:/$DESTDIR/%
- # IF YOU WANT TO LIMIT THE IO PRIORITY,
- # PREPEND THE FOLLOWING TO THE rsync & cd/find COMMANDS ABOVE:
- # ionice -c2
Advertisement
Add Comment
Please, Sign In to add comment