backup studio projects, attempt to speedup/parallelize
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#backup studio project files | |
#ignore build/ dir | |
SRC_DIR="/home/james/AndroidStudioProjects/" | |
DEST_DIR="/run/media/james/tank/Backups/studio/" | |
cd $SRC_DIR | |
#step 1::copy dirs struct | |
rsync -v -d $SRC_DIR $DEST_DIR | |
PROJS_LIST=`find . -mindepth 1 -maxdepth 1 -print` | |
wait | |
#step 2::backup each project dir | |
parallel -j200% --max-procs 20 --joblog /tmp/par_logs 'rsync -aAXvz --progress --human-readable --delete --exclude=*build/ {} $DEST_DIR{.}' ::: $PROJS_LIST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
GNU Parallel put into good use :-)