Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@oguya
Created July 9, 2014 19:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save oguya/91e1a44ce0b91999582a to your computer and use it in GitHub Desktop.
Save oguya/91e1a44ce0b91999582a to your computer and use it in GitHub Desktop.
backup studio projects, attempt to speedup/parallelize
#!/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
@Brainiarc7
Copy link

GNU Parallel put into good use :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment