Skip to content

Instantly share code, notes, and snippets.

@sardbaba
sardbaba / backup_all_dbs.sh
Created November 18, 2012 20:35
Backup All DB's and transfer to S3 with s3cmd + Rolling on the days of the weeks and on the weeks of the months + a montly backup (for paranoiac guys)
#!/bin/bash
BACKUP_DIR="~/db_backups"
DBUSER=""
DBPASSWORD=""
BUCKET="your-unique-bucket-name"
FROM='"Backups" <backups@localhost>'
TO='"Admin" <admin@localhost>'
SUBJECT='Backup Log'