fix for spaces in username or password for pg_dump

This commit is contained in:
wh1te909 2020-10-30 03:55:50 +00:00
parent 32c2d42efb
commit 8ee4a08438
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
SCRIPT_VERSION="1" SCRIPT_VERSION="2"
SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/develop/backup.sh' SCRIPT_URL='https://raw.githubusercontent.com/wh1te909/tacticalrmm/develop/backup.sh'
GREEN='\033[0;32m' GREEN='\033[0;32m'
@ -50,7 +50,7 @@ mkdir ${tmp_dir}/rmm
mkdir ${tmp_dir}/confd 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 tar -czvf ${tmp_dir}/meshcentral/mesh.tar.gz --exclude=/meshcentral/node_modules /meshcentral
mongodump --gzip --out=${tmp_dir}/meshcentral/mongo mongodump --gzip --out=${tmp_dir}/meshcentral/mongo