Created
March 11, 2018 14:37
-
-
Save mykhas/5be615d434efd05653bfab2674e8cadc to your computer and use it in GitHub Desktop.
IBM Cloud Object Storage backup script
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 | |
TOKEN=`bx iam oauth-tokens | sed -n 1p | awk 'NF>1{print $NF}'` | |
for FILENAME in ~/Documents/*.org; do | |
echo "$FILENAME" | |
curl -X PUT "https://s3.eu-geo.objectstorage.softlayer.net/org/$FILENAME" \ | |
-H "authorization: Bearer $TOKEN" \ | |
--data-binary @"$FILENAME" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment