diff --git a/client/CHANGELOG.md b/client/CHANGELOG.md index 9b4d387..7f5a711 100644 --- a/client/CHANGELOG.md +++ b/client/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * tolerate absence of mtr or traceroute * Only one loop for all Redis instances * remodel how we build the rsync command +* use sub shells instead of moving around ### Deprecated diff --git a/client/zzz_evobackup b/client/zzz_evobackup index 9871b44..8f057ca 100755 --- a/client/zzz_evobackup +++ b/client/zzz_evobackup @@ -255,9 +255,10 @@ local_tasks() { # mv ~postgres/pg.dump.bak ${LOCAL_BACKUP_DIR}/ ## another method with gzip directly piped - # cd /var/lib/postgresql - # sudo -u postgres pg_dumpall | gzip > ${LOCAL_BACKUP_DIR}/pg.dump.bak.gz - # cd - > /dev/null + # ( + # cd /var/lib/postgresql; + # sudo -u postgres pg_dumpall | gzip > ${LOCAL_BACKUP_DIR}/pg.dump.bak.gz + # ) ## example with all tables from MYBASE excepts TABLE1 and TABLE2 # pg_dump -p 5432 -h 127.0.0.1 -U USER --clean -F t --inserts -f ${LOCAL_BACKUP_DIR}/pg-backup.tar -t 'TABLE1' -t 'TABLE2' MYBASE @@ -268,10 +269,11 @@ local_tasks() { ## example with compressed PostgreSQL dump for each databases # mkdir -p -m 700 ${LOCAL_BACKUP_DIR}/postgresql # chown postgres:postgres ${LOCAL_BACKUP_DIR}/postgresql - # cd /var/lib/postgresql - # dbs=$(sudo -u postgres psql -U postgres -lt | awk -F\| '{print $1}' |grep -v template*) - # for databases in $dbs ; do sudo -u postgres /usr/bin/pg_dump --create -s -U postgres -d $databases | gzip --best -c > ${LOCAL_BACKUP_DIR}/postgresql/$databases.sql.gz ; done - # cd - > /dev/null + # ( + # cd /var/lib/postgresql + # dbs=$(sudo -u postgres psql -U postgres -lt | awk -F\| '{print $1}' |grep -v template*) + # for databases in $dbs ; do sudo -u postgres /usr/bin/pg_dump --create -s -U postgres -d $databases | gzip --best -c > ${LOCAL_BACKUP_DIR}/postgresql/$databases.sql.gz ; done + # ) ## MongoDB