Skip to content

Commit 74db798

Browse files
committed
restore: configure njobs and enable verbose mode
1 parent 3065c93 commit 74db798

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backup.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@ 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+
5559
echo "Downloading latest snapshot from $PG_BACKUP_FILE"
5660
curl -o dump.backup $PG_BACKUP_FILE
5761

5862
echo "Restoring $POSTGRES_DB database"
59-
pg_restore -c -C -d $POSTGRES_DB $POSTGRES_HOST_OPTS dump.backup
63+
pg_restore -v -c -C -d $POSTGRES_DB $POSTGRES_HOST_OPTS -j $PG_RESTORE_JOBS dump.backup
6064
;;
6165
esac

0 commit comments

Comments
 (0)