Skip to content

Instantly share code, notes, and snippets.

@damieng
Last active October 6, 2017 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damieng/d7eb8bc0777168b669feef419cdc113a to your computer and use it in GitHub Desktop.
Save damieng/d7eb8bc0777168b669feef419cdc113a to your computer and use it in GitHub Desktop.
DamienG daily backup script to S3
cd ~/backup
rm *
_today=$(date +"%Y%m%d")
tar -c --xz -f $_today-nginx-config-dedicated.tar.xz -C /etc nginx
tar -c --xz -f $_today-damieng-files.tar.xz -C /var/www damieng
mysqldump wpDamieng | xz -9 -c - > $_today-damieng-wordpress-db.xz
cp ../*.sh .
aws s3 sync . s3://damieng-backup --storage-class STANDARD_IA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment