When doing cd -
, redirect stdout
Because, `cd -` will displays on stdout the path... And we want only errors in the cron output.
This commit is contained in:
parent
7b9f834e4a
commit
ade9cd0e7c
|
@ -99,7 +99,7 @@ mkdir -p -m 700 /home/backup
|
||||||
## another method with gzip directly piped
|
## another method with gzip directly piped
|
||||||
# cd /var/lib/postgresql
|
# cd /var/lib/postgresql
|
||||||
# sudo -u postgres pg_dumpall | gzip > /home/backup/pg.dump.bak.gz
|
# sudo -u postgres pg_dumpall | gzip > /home/backup/pg.dump.bak.gz
|
||||||
# cd -
|
# cd - > /dev/null
|
||||||
|
|
||||||
## example with all tables from MYBASE excepts TABLE1 and TABLE2
|
## 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 /home/backup/pg-backup.tar -t 'TABLE1' -t 'TABLE2' MYBASE
|
# pg_dump -p 5432 -h 127.0.0.1 -U USER --clean -F t --inserts -f /home/backup/pg-backup.tar -t 'TABLE1' -t 'TABLE2' MYBASE
|
||||||
|
|
Loading…
Reference in a new issue