From 58f74c3095bf8d6b07107d3dd5d24e0186dff82a Mon Sep 17 00:00:00 2001 From: Monocots Date: Sun, 30 Jun 2019 15:48:30 +0000 Subject: [PATCH] backup strategy: reduce size of daily backup dumps We need a new backup strategy. In the meantime, dramatically reduce the size by not dumping large tables. TODO: even increase the frequency of dumping the more volatile data? TODO: implement some kind of incremental backup. --- modules/rhizo_base/files/bin/pg_backup_rotated.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/rhizo_base/files/bin/pg_backup_rotated.sh b/modules/rhizo_base/files/bin/pg_backup_rotated.sh index f9faf8d..f2ae49b 100755 --- a/modules/rhizo_base/files/bin/pg_backup_rotated.sh +++ b/modules/rhizo_base/files/bin/pg_backup_rotated.sh @@ -28,6 +28,11 @@ function perform_backups() SUFFIX=$1 FINAL_BACKUP_DIR=$BACKUP_DIR"`date +\%Y-\%m-\%d`$SUFFIX/" + EX_TABLES = "" + if [ $SUFFIX = "-daily" ] ; then + EX_TABLES=" -T cdr -T sms -T prefix_mexico -T rates " + fi + echo "Making backup directory in $FINAL_BACKUP_DIR" if ! mkdir -p $FINAL_BACKUP_DIR; then