Commit 4b1e3e6

mo khan <mo@mokhan.ca>
2015-12-24 19:52:13
skip aws backup if S3_PATH is not set.
1 parent 85d90e1
Changed files (1)
templates/pg_backup_rotated.sh.erb
@@ -132,6 +132,6 @@ fi
 find $BACKUP_DIR -maxdepth 1 -mtime +$DAYS_TO_KEEP -name "*-daily" -exec rm -rf '{}' ';'
 perform_backups "-daily"
 
-if [ -z $S3_PATH ] ; then
-  aws s3 sync $BACKUP_DIR $S3_PATH
-fi
+[ -z "$S3_PATH" ] && echo "no aws backup" && exit 0;
+
+aws s3 sync $BACKUP_DIR $S3_PATH