Skip to content

Instantly share code, notes, and snippets.

View kunthar's full-sized avatar
🖖
live long and prosper

Gokhan Boranalp kunthar

🖖
live long and prosper
View GitHub Profile
@janit
janit / db_backup.sh
Created June 26, 2017 06:15
Rotating PostgreSQL Backup Script
#!/bin/bash
# for use with cron, eg:
# 0 3 * * * postgres /var/db/db_backup.sh foo_db
if [[ -z "$1" ]]; then
echo "Usage: $0 <db_name> [pg_dump args]"
exit 1
fi