From 804309d62ccd865903f9bfe98fd854cc2f4b0bd5 Mon Sep 17 00:00:00 2001 From: "M.Goldshteyn" Date: Fri, 6 Sep 2024 10:16:19 +0300 Subject: [PATCH] backup name --- create_db.sh.template | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/create_db.sh.template b/create_db.sh.template index 3bf967f..6c983ff 100644 --- a/create_db.sh.template +++ b/create_db.sh.template @@ -9,7 +9,6 @@ su - postgres -c "PGPASSWORD=\"DESTINATION_POSTGRES_PASSWORD\" psql -U postgres TEMPLATE = template0 CONNECTION LIMIT = -1;\"" - -set "PGPASSWORD=\"DESTINATION_POSTGRES_PASSWORD\"" -export "PGPASSWORD=DESTINATION_POSTGRES_PASSWORD" +set "PGPASSWORD=DESTINATION_POSTGRES_PASSWORD" +su - postgres -c "export \"PGPASSWORD=DESTINATION_POSTGRES_PASSWORD\"" su - postgres -c "pg_restore -j 2 -d DESTINATION_DB_NAME /var/backups/DB_BACKUP" \ No newline at end of file