Skip to content

Instantly share code, notes, and snippets.

@jufemaiz
Created March 8, 2012 03:26
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 jufemaiz/1998399 to your computer and use it in GitHub Desktop.
Save jufemaiz/1998399 to your computer and use it in GitHub Desktop.
Backup of the MySQL Database Shell Script
#!/bin/bash
# Backup of the MySQL Database
mysqldump -u $DATABASE_USER -p $DATABASE_NAME |gzip ->$(date +%Y%m%d%H%M%S)_ftp_db.sql.gz
@jufemaiz
Copy link
Author

jufemaiz commented Mar 8, 2012

Will prompt for database password. If being used in anger (aka production), use configuration to manage passwords of database. Also assumes localhost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment