Skip to content

Instantly share code, notes, and snippets.

@AV4TAr
Created June 19, 2012 16:21
Show Gist options
  • Select an option

  • Save AV4TAr/2955071 to your computer and use it in GitHub Desktop.

Select an option

Save AV4TAr/2955071 to your computer and use it in GitHub Desktop.
mysql backup script
#!/bin/sh
DATE=`date +%a`
DEST=/srv/backups
FILE=$DEST/mysql-bkp-${DATE}.sql.gz
mysqldump -uMY_USERNAME -pMY_PASSWORD MY_DATABASE | gzip > $FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment