From 0ca035d7ef00fb997a5b96cf17556a2e50d45950 Mon Sep 17 00:00:00 2001 From: Igor Diakonov Date: Thu, 26 Sep 2019 11:03:17 +0300 Subject: [PATCH] Added jobs count --- postgres-restore-s3/Dockerfile | 1 + postgres-restore-s3/restore.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/postgres-restore-s3/Dockerfile b/postgres-restore-s3/Dockerfile index a0f8ce3..8bac82f 100644 --- a/postgres-restore-s3/Dockerfile +++ b/postgres-restore-s3/Dockerfile @@ -9,6 +9,7 @@ ENV POSTGRES_HOST **None** ENV POSTGRES_PORT 5432 ENV POSTGRES_USER **None** ENV POSTGRES_PASSWORD **None** +ENV RESTORE_JOBS 4 ENV S3_ACCESS_KEY_ID **None** ENV S3_SECRET_ACCESS_KEY **None** ENV S3_BUCKET **None** diff --git a/postgres-restore-s3/restore.sh b/postgres-restore-s3/restore.sh index 58b04c2..a569d2c 100644 --- a/postgres-restore-s3/restore.sh +++ b/postgres-restore-s3/restore.sh @@ -73,7 +73,7 @@ fi echo "Restoring ${LATEST_BACKUP}" -pg_restore $POSTGRES_HOST_OPTS -C -c --if-exists --no-owner -j 4 -v -d $POSTGRES_DATABASE dump.sql +pg_restore $POSTGRES_HOST_OPTS -C -c --if-exists --no-owner -j $RESTORE_JOBS -v -d $POSTGRES_DATABASE dump.sql echo "Restore complete"