OS Manuals

/opt/iamguarded/postgresql/bin/pg_restore

Compatibility package for iamguarded variant of pgpool2

From pgpool2-4.7-iamguarded-compat 4.7.2-r0 (os), captured 2026-11-05 by running pg_restore --help (exit 0). permalink

pg_restore restores a PostgreSQL database from an archive created by pg_dump.

Usage:
  pg_restore [OPTION]... [FILE]

General options:
  -d, --dbname=NAME        connect to database name
  -f, --file=FILENAME      output file name (- for stdout)
  -F, --format=c|d|t       backup file format (should be automatic)
  -l, --list               print summarized TOC of the archive
  -v, --verbose            verbose mode
  -V, --version            output version information, then exit
  -?, --help               show this help, then exit

Options controlling the restore:
  -a, --data-only              restore only the data, no schema
  -c, --clean                  clean (drop) database objects before recreating
  -C, --create                 create the target database
  -e, --exit-on-error          exit on error, default is to continue
  -I, --index=NAME             restore named index
  -j, --jobs=NUM               use this many parallel jobs to restore
  -L, --use-list=FILENAME      use table of contents from this file for
                               selecting/ordering output
  -n, --schema=NAME            restore only objects in this schema
  -N, --exclude-schema=NAME    do not restore objects in this schema
  -O, --no-owner               skip restoration of object ownership
  -P, --function=NAME(args)    restore named function
  -s, --schema-only            restore only the schema, no data
  -S, --superuser=NAME         superuser user name to use for disabling triggers
  -t, --table=NAME             restore named relation (table, view, etc.)
  -T, --trigger=NAME           restore named trigger
  -x, --no-privileges          skip restoration of access privileges (grant/revoke)
  -1, --single-transaction     restore as a single transaction
  --disable-triggers           disable triggers during data-only restore
  --enable-row-security        enable row security
  --filter=FILENAME            restore or skip objects based on expressions
                               in FILENAME
  --if-exists                  use IF EXISTS when dropping objects
  --no-comments                do not restore comment commands
  --no-data                    do not restore data
  --no-data-for-failed-tables  do not restore data of tables that could not be
                               created
  --no-policies                do not restore row security policies
  --no-publications            do not restore publications
  --no-schema                  do not restore schema
  --no-security-labels         do not restore security labels
  --no-statistics              do not restore statistics
  --no-subscriptions           do not restore subscriptions
  --no-table-access-method     do not restore table access methods
  --no-tablespaces             do not restore tablespace assignments
  --restrict-key=RESTRICT_KEY  use provided string as psql \restrict key
  --section=SECTION            restore named section (pre-data, data, or post-data)
  --statistics                 restore the statistics
  --statistics-only            restore only the statistics, not schema or data
  --strict-names               require table and/or schema include patterns to
                               match at least one entity each
  --transaction-size=N         commit after every N objects
  --use-set-session-authorization
                               use SET SESSION AUTHORIZATION commands instead of
                               ALTER OWNER commands to set ownership

Connection options:
  -h, --host=HOSTNAME      database server host or socket directory
  -p, --port=PORT          database server port number
  -U, --username=NAME      connect as specified database user
  -w, --no-password        never prompt for password
  -W, --password           force password prompt (should happen automatically)
  --role=ROLENAME          do SET ROLE before restore

The options -I, -n, -N, -P, -t, -T, and --section can be combined and specified
multiple times to select multiple objects.

If no input file name is supplied, then standard input is used.

Report bugs to <pgsql-bugs@lists.postgresql.org>.
PostgreSQL home page: <https://www.postgresql.org/>
Options (52)
OptionDescriptionSource
-d, --dbname NAMEconnect to database namehelp
-f, --file FILENAMEoutput file name (- for stdout)help
-F, --format c|d|tbackup file format (should be automatic)help
-l, --listprint summarized TOC of the archivehelp
-v, --verboseverbose modehelp
-V, --versionoutput version information, then exithelp
-?, --helpshow this help, then exithelp
-a, --data-onlyrestore only the data, no schemahelp
-c, --cleanclean (drop) database objects before recreatinghelp
-C, --createcreate the target databasehelp
-e, --exit-on-errorexit on error, default is to continuehelp
-I, --index NAMErestore named indexhelp
-j, --jobs NUMuse this many parallel jobs to restorehelp
-L, --use-list FILENAMEuse table of contents from this file for selecting/ordering outputhelp
-n, --schema NAMErestore only objects in this schemahelp
-N, --exclude-schema NAMEdo not restore objects in this schemahelp
-O, --no-ownerskip restoration of object ownershiphelp
-P, --function NAME(args)restore named functionhelp
-s, --schema-onlyrestore only the schema, no datahelp
-S, --superuser NAMEsuperuser user name to use for disabling triggershelp
-t, --table NAMErestore named relation (table, view, etc.)help
-T, --trigger NAMErestore named triggerhelp
-x, --no-privilegesskip restoration of access privileges (grant/revoke)help
-1, --single-transactionrestore as a single transactionhelp
--disable-triggersdisable triggers during data-only restorehelp
--enable-row-securityenable row securityhelp
--filter FILENAMErestore or skip objects based on expressions in FILENAMEhelp
--if-existsuse IF EXISTS when dropping objectshelp
--no-commentsdo not restore comment commandshelp
--no-datado not restore datahelp
--no-data-for-failed-tablesdo not restore data of tables that could not be createdhelp
--no-policiesdo not restore row security policieshelp
--no-publicationsdo not restore publicationshelp
--no-schemado not restore schemahelp
--no-security-labelsdo not restore security labelshelp
--no-statisticsdo not restore statisticshelp
--no-subscriptionsdo not restore subscriptionshelp
--no-table-access-methoddo not restore table access methodshelp
--no-tablespacesdo not restore tablespace assignmentshelp
--restrict-key RESTRICT_KEYuse provided string as psql \restrict keyhelp
--section SECTIONrestore named section (pre-data, data, or post-data)help
--statisticsrestore the statisticshelp
--statistics-onlyrestore only the statistics, not schema or datahelp
--strict-namesrequire table and/or schema include patterns to match at least one entity eachhelp
--transaction-size Ncommit after every N objectshelp
--use-set-session-authorizationuse SET SESSION AUTHORIZATION commands instead of ALTER OWNER commands to set ownershiphelp
-h, --host HOSTNAMEdatabase server host or socket directoryhelp
-p, --port PORTdatabase server port numberhelp
-U, --username NAMEconnect as specified database userhelp
-w, --no-passwordnever prompt for passwordhelp
-W, --passwordforce password prompt (should happen automatically)help
--role ROLENAMEdo SET ROLE before restorehelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.