Last active
July 6, 2017 17:37
-
-
Save WillForan/4f2c5096b87398d2b18ea75027f87d0c to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# where to transfer folders | |
locOnGinger=/path/to/new/Siegle/ | |
# make sure we can save logs | |
[ ! -d rsynclog] && mkdir rsynclog | |
# get dirs to tx from google doc, only grab those less than 300Gb | |
curl 'https://docs.google.com/spreadsheets/d/1wfXnWH7zI6H79u6o3fYV59iPBhG-JyaGhys7O9zmDCE/pub?output=tsv'| | |
awk '($3< 300000){print $2}' | | |
while read txdir; do | |
# do not want a trailing slash on the directory! | |
txdirnoslash=$(basename $txdir) | |
# rsync command. remove --dry-run to actually transfer | |
rsync -arLvhi --size-only --inplace --dry-run --progress \ | |
wallace.wpic.upmc.edu:/data/Siegle/$txdirnoslash \ | |
$locOnGinger | | |
tee rsynclog/$txdirnoslash.log | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment