<<back
pg_restore
General options
dbname:
-d, --dbname=NAME connect to database name
file:
-f, --file=FILENAME output file name
format:
-F, --format=c|t specify backup file format
ignore-version:
-i, --ignore-version proceed even when server version mismatches
verbose
-v, --verbose verbose mode
compress:
-Z, --compress=0-9 compression level for compressed formats
help
--help show this help, then exit
version
--version output version information, then exit
Options controlling the restore
data-only
-a, --data-only restore only the data, no schema
clean
-c, --clean clean (drop) schema prior to create
create
-C, --create create the target database
index:
-I, --index=NAME restore named index
use-list:
-L, --use-list=FILENAME use specified table of contents for ordering output from this file
schema:
-n, --schema=NAME restore only objects in this schema
no-owner
-O, --no-owner skip restoration of object ownership
function:
-P, --function=NAME restore named function
schema-only
-s, --schema-only restore only the schema, no data
superuser:
-S, --superuser=NAME specify the superuser user name to use for disabling triggers
table:
-t, --table=NAME restore named table
trigger:
-T, --trigger=NAME restore named trigger
no-privileges
-x, --no-privileges skip restoration of access privileges (grant/revoke)
disable-triggers
--disable-triggers disable triggers during data-only restore
use-set-session-authorization
--use-set-session-authorization use SESSION AUTHORIZATION commands instead of OWNER TO commands
no-data-for-failed-tables
--no-data-for-failed-tables do not restore data of tables that could not be created
single-transaction
-1, --single-transaction restore as a single transaction
Connection options
host:
-h, --host=HOSTNAME database server host or socket directory
port:
-p, --port=PORT database server port number
username:
-U, --username=NAME connect as specified database user
password
-W, --password force password prompt (should happen automatically)
exit-on-error
-e, --exit-on-error exit on error, default is to continue
Create Command
Reset