Last active
August 29, 2015 14:11
-
-
Save micheleorsi/1fcf6f2d0c66558f5834 to your computer and use it in GitHub Desktop.
Make a zip, upload to Google Cloud Storage every couple of days
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
# every couple of days at 2PM run git repo backup | |
0 14 */2 * * /home/git/runBackup.sh |
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 | |
now=`date +"%Y%m%d"` | |
echo "zipping to backup$now" | |
zip -r backup$now.zip repositories | |
/home/git/google-cloud-sdk/bin/gsutil cp backup*.zip gs://<bucket-name> # WARN: modify this line! | |
rm backup*.zip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment