- t>
- tar>
+ c>
+ custom>
- Output a tar archive suitable for input into
-
pg_restore. Using this archive format
- allows reordering and/or exclusion of database objects
- at the time the database is restored. It is also possible to limit
- which data is reloaded at restore time.
+ Output a custom archive suitable for input into
+
pg_restore. This is the most flexible
+ format in that it allows reordering of loading data as well
+ as object definitions. This format is also compressed by default.
- c>
- custom>
+ t>
+ tar>
- Output a custom archive suitable for input into
-
pg_restore. This is the most flexible
- format in that it allows reordering of loading data as well
- as object definitions. This format is also compressed by default.
+ Output a tar archive suitable for input into
+
pg_restore. Using this archive format
+ allows reordering and/or exclusion of database objects
+ at the time the database is restored. It is also possible to limit
+ which data is reloaded at restore time.
- To dump a database called mydb> to a tar
+ To dump a database called mydb> to a file in custom format:
file:
-
$ pg_dump -Ft mydb > db.tar
+
$ pg_dump -Fc mydb > db.out
To reload this dump into an existing database called newdb>:
-
$ pg_restore -d newdb db.tar
+
$ pg_restore -d newdb db.out