Created
March 23, 2016 10:41
-
-
Save drewgates/50cb5bcbe2c84de2ef76 to your computer and use it in GitHub Desktop.
very simple 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 | |
# Very Simple Backup Script. | |
# Place this script in your project folder, and use chmod +x to make it executable. | |
# Either run manual backups periodically with ./savechanges.sh or set up a cron job to automate. | |
# Enjoy! | |
NOW=$(date +%Y%b%d-%H_%M) | |
echo "backing up" | |
date | |
tar -zcf ~/streamwhus-changes-$NOW.tar.gz ./* | |
echo "archive size:" | |
du -hs ~/site-changes-$NOW.tar.gz | cut -f1 | |
echo "backup completed." | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment