add postgresql bdr role

This commit is contained in:
Kevin Fenzi 2016-10-14 19:45:20 +00:00
parent 83f3b206c9
commit 0f2bfd76f8
12 changed files with 833 additions and 0 deletions

View file

@ -0,0 +1,10 @@
#!/bin/bash
# Backup a database *locally* to /backups/.
DB=$1
# Make our latest backup
/usr/bin/pg_dump --exclude-table-data=sessions -C $DB | /usr/bin/xz > /backups/$DB-$(date +%F).dump.xz
# Also, delete the backup from a few days ago.
rm -f /backups/$DB-$(date --date="2 days ago" +%F).dump.xz