Another method with gzip directly piped for pg_dumpall.
This commit is contained in:
parent
e5ac7e6e73
commit
d461e44609
|
@ -97,6 +97,10 @@ mkdir -p -m 700 /home/backup
|
||||||
## example with pg_dumpall (warning: you need space in ~postgres)
|
## example with pg_dumpall (warning: you need space in ~postgres)
|
||||||
# su - postgres -c "pg_dumpall > ~/pg.dump.bak"
|
# su - postgres -c "pg_dumpall > ~/pg.dump.bak"
|
||||||
# mv ~postgres/pg.dump.bak /home/backup/
|
# mv ~postgres/pg.dump.bak /home/backup/
|
||||||
|
## another method with gzip directly piped
|
||||||
|
# cd /var/lib/postgresql
|
||||||
|
# sudo -u postgres pg_dumpall | gzip > /home/backup/pg.dump.bak.gz
|
||||||
|
# cd -
|
||||||
|
|
||||||
## 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