Skip to content

Instantly share code, notes, and snippets.

@cedricporter
Last active August 29, 2015 14:04
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 cedricporter/50ce57a319ee8edb2314 to your computer and use it in GitHub Desktop.
Save cedricporter/50ce57a319ee8edb2314 to your computer and use it in GitHub Desktop.
MySQL backup script
#!/bin/sh
# # m h dom mon dow user command
# 30 4 * * 1,3,4 root /root/backup_db.sh
# 41 4 * * 1,3,4 root /root/dropbox.py start
# 57 4 * * 1,3,4 root /root/dropbox.py stop
mysqldump -u root -p'password' --all-databases | gzip > /root/Dropbox/backups/mysql_bak/`date +%F`.sql.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment