Skip to content

Instantly share code, notes, and snippets.

@amomin
amomin / README.md
Last active August 29, 2015 14:16
Sample Simple DB dump script

Simple MySQLDump script

If run daily, will keep daily snapshots for one week, weekly snapshots for one month, and monthly snapshots for one year.

You will need a database user with SELECT privileges for the given database. This example suggests to place the mysql creds in the .my.cnf file - suggest to set the permissions on this file to 600.

This is a gist