POSTGRESQL PG_DUMP, PG_DUMPALL, PG_RESTORE CHEAT SHEET
pg_dump, pg_dump_all, pg_restore are all located in
the bin folder of the PostgreSQL install and PgAdmin III install.
pg_dump dumps a database as a text file or to other formats.
Usage: pg_dump [OPTION]... [DBNAME]
pg_dumpall extracts a PostgreSQL database cluster into an SQL script file.
Usage: pg_dumpall [OPTION]...
pg_restore restores a PostgreSQL database from an archive created by pg_dump.
Usage: pg_restore [OPTION]... [FILE]
-d, --dbname=NAME ==> connect to database name (pg_dump uses this to mean inserts)
-f, --file=FILENAME ==> output file name
-F, --format=c|t|p (p only for pg_dump, psql to restore p)==> specify backup file format (c = compressed, t = tar, p = plain text)
-i, --ignore-version==>proceed even when server version mismatches
-l, --list ==>print summarized TOC of the archive
-v, --verbose ==>verbose mode
--help ==>show this help, then exit
--version ==>output version information, then exit
-Z, --compress=0-9 ==>compression level for compressed formats
No comments:
Post a Comment