Skip to content

Instantly share code, notes, and snippets.

@mynameisrufus
mynameisrufus / db_backup.sh
Created February 9, 2011 03:05
Postgres backup script (rails focused)
# Postgres backup script
# mynameisrufus
#
# Cron tab examples:
#
# daily keeping the last 5 days (run at 1:00AM, 2 minutes after the hour)
#
# 02 1 * * * postgres /script/db_backup.sh daily /var/backups/db $DATABASE_OWNER 5 >> /var/backups/db/backup.log 2>&1
#
#