From 8ee4a0843864a7046c98e4a681cda08be9960156 Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Fri, 30 Oct 2020 03:55:50 +0000 Subject: [PATCH] fix for spaces in username or password for pg_dump --- backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index fc778c18..05c79f6d 100644 --- a/backup.sh +++ b/backup.sh @@ -1,6 +1,6 @@ #!/bin/bash -SCRIPT_VERSION="1" +SCRIPT_VERSION="2" SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/develop/backup.sh' GREEN='\033[0;32m' @@ -50,7 +50,7 @@ mkdir ${tmp_dir}/rmm mkdir ${tmp_dir}/confd -pg_dump --dbname=postgresql://${POSTGRES_USER}:${POSTGRES_PW}@127.0.0.1:5432/tacticalrmm | gzip -9 > ${tmp_dir}/postgres/db-${dt_now}.psql.gz +pg_dump --dbname=postgresql://"${POSTGRES_USER}":"${POSTGRES_PW}"@127.0.0.1:5432/tacticalrmm | gzip -9 > ${tmp_dir}/postgres/db-${dt_now}.psql.gz tar -czvf ${tmp_dir}/meshcentral/mesh.tar.gz --exclude=/meshcentral/node_modules /meshcentral mongodump --gzip --out=${tmp_dir}/meshcentral/mongo