apisub_backup.sh 270 Bytes
Newer Older
Stephane Crozat's avatar
Stephane Crozat committed
1
2
3
4
5
6
7
8
9
#!/bin/bash
# Execute as postgres user
# crontab -e : 0 * * * * /media/stc/data/git/apisub/sql/apisub_backup.sh
path='/home/apisub/backup'
date=`date -Iminutes`
echo "$date"
file="$path/apisub_$date.dump"
echo "Backuping apisub to $file"
pg_dump -cC --file $file apisub