Created
March 28, 2016 17:03
-
-
Save dansku/5488a229e6b957da6974 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| #today variable as YYYY-MM-DD | |
| NOW=$(date +"%Y-%m-%d") | |
| #Upload all files to our dated folder in the selected bucket | |
| gsutil cp /home/backups/files/* gs://bucket-name/$NOW | |
| #Delete all the files after uploading them | |
| rm /home/backups/files/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment