Created
December 23, 2013 07:14
-
-
Save nkrumm/8092870 to your computer and use it in GitHub Desktop.
DIY Direct-to-S3 Aspera solution. This snipped monitors a directory for new files (uploaded via aspera, for example) and then starts a background s3cmd job to upload those files
Using the --partial-file-suffix=.part for the ascp command ensures that inotifywait only gets trigger when the file is finished uploading.
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
inotifywait -m -e moved_to $BASE | while read line | |
do | |
F=$(echo $line | cut -f3 -d" ") | |
echo "Now uploading $F" | |
s3cmd --force --no-progress put $F s3://mybucket/ & | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment