Created
August 19, 2015 06:12
-
-
Save qwazix/6f49edd7b3ebc6e75d4f to your computer and use it in GitHub Desktop.
Backup your owncloud instance to Amazon Glacier
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 | |
#install glacier-cmd | |
#set up your ~./glacier-cmd file | |
#run this in a cron job | |
name=/home/user/backups/c.d-e.gr_$(date '+%y-%m-%d').tar.gz | |
mysqldump --lock-tables -h localhost -u dbuser -pdbpass, dbname > /home/owncloud/dbbackup/owncloud-sqlbkp.bak | |
tar czvf "$name" /home/owncloud | |
glacier-cmd upload c.d-e.gr $name | |
rm $name | |
echo "Backed up $name" >> ~/backuplog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment