File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ backuper:
1919 - POSTGRES_DB=${POSTGRES_DB:-dipdup}
2020 - POSTGRES_HOST=${POSTGRES_HOST:-db}
2121 - POSTGRES_EXTRA_OPTS=${POSTGRES_EXTRA_OPTS}
22+ - PG_BACKUP_ACTION=${PG_BACKUP_ACTION:-dump} # or restore
23+ - PG_BACKUP_FILE=${PG_BACKUP_FILE} # for restore
2224 - HEARTBEAT_URI=${HEARTBEAT_URI}
2325 - SCHEDULE=${SCHEDULE}
2426` ` `
Original file line number Diff line number Diff line change @@ -52,14 +52,10 @@ case "${PG_BACKUP_ACTION:-dump}" in
5252 exit 1
5353 fi
5454
55- if [ -z " ${PG_RESTORE_JOBS} " ]; then
56- PG_RESTORE_JOBS=1
57- fi
58-
5955 echo " Downloading latest snapshot from $PG_BACKUP_FILE "
6056 curl -o dump.backup $PG_BACKUP_FILE
6157
6258 echo " Restoring $POSTGRES_DB database"
63- pg_restore -v -c -C - d $POSTGRES_DB $POSTGRES_HOST_OPTS -j $PG_RESTORE_JOBS dump.backup
59+ pg_restore -v -d $POSTGRES_DB $POSTGRES_HOST_OPTS dump.backup
6460 ;;
6561esac
You can’t perform that action at this time.
0 commit comments