Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Shell script to backup and gzip your database.
#change the username, password, and database names below.
mysqldump -uusername -ppassword database > database_`date +'%Y-%m-%d'`.sql
gzip database_`date +'%Y-%m-%d'`.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.