Difference between revisions of "Main Page/IT/Postgresql"
From Lewis Consultancy Wiki
Jump to navigationJump to search (Created page with "===Back up a database remotely with compression=== <pre>ssh root@dbserver 'sudo -Hu postgres /usr/lib/postgresql/9.4/bin/pg_dump dbname | gzip -f9' > output.sql.gz</pre>") |
|||
Line 1: | Line 1: | ||
===Back up a database remotely with compression=== | ===Back up a database remotely with compression=== | ||
− | <pre>ssh root@dbserver 'sudo -Hu postgres /usr/lib/postgresql/9.4/bin/ | + | <pre>ssh root@dbserver 'sudo -Hu postgres /usr/lib/postgresql/9.4/bin/pg_dumpall | gzip -f9' > output.sql.gz</pre> |
Latest revision as of 12:00, 4 February 2016
Back up a database remotely with compression
ssh root@dbserver 'sudo -Hu postgres /usr/lib/postgresql/9.4/bin/pg_dumpall | gzip -f9' > output.sql.gz