Delete old postgresql backups.
This commit is contained in:
parent
6326659ba0
commit
6910ca6b48
1 changed files with 4 additions and 0 deletions
|
@ -3,4 +3,8 @@
|
|||
|
||||
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