adding new role for upstreamfirst pagure instance
This commit is contained in:
parent
8eb3174bc1
commit
f3bf1103b8
21 changed files with 1287 additions and 32 deletions
10
roles/pagure/upstreamfirst-frontend/files/backup-database
Normal file
10
roles/pagure/upstreamfirst-frontend/files/backup-database
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
# Backup a database *locally* to /backups/.
|
||||
|
||||
DB=$1
|
||||
|
||||
# Make our latest backup
|
||||
/usr/bin/pg_dump -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="3 days ago" +%F).dump.xz
|
Loading…
Add table
Add a link
Reference in a new issue