pg_restore restore a PostgreSQL database from an archive file created by pg_dump ¶
Description ¶
A core utility for restoring a PostgreSQL database from an archive file previously created by pg_dump
pg_restore is a core utility for restoring PostgreSQL database from an archive file previously created by pg_dump.
pg_restore was added in PostgreSQL 7.1.
- pg_restore –help
-
man
pg_restore
-
pg_restore PostgreSQL 15.1 Documentation
- Exit if an error is encountered while sending SQL commands to the database
- List the table of contents of the archive
- Restore only those archive elements that are listed in list-file
- Restore only objects that are in the named schema
- Do not restore objects that are in the named schema
- Do not output commands to set ownership of objects
- Restore only the schema (data definitions), not data
- Specifies verbose mode
- Print the pg_restore version and exit
- Prevent restoration of access privileges
- -1 –single-transaction
- Use conditional commands (i.e., add an IF EXISTS clause)
- Require that each schema qualifier match at least one schema in the backup file
- Show help about pg_restore command line arguments, and exit
- Specifies a role name to be used to perform the restore
- NOTES
-
pg_restore PostgreSQL 15.1 Documentation
- pg_restore examples