![]() ![]() POSTGRESQL ARCHIVEpg_dump can backup a complete database, and then pg_restore can review the archive and/or decide which sections of the database should be restored. When paired with pg_restore and one of the archive file formats, pg_dump provides a versatile archival and transfer method. The archive file formats were created with portability in mind. They allow pg_restore to be picky about what it restores, and even reorder items before they’re restored. To rebuild the database, various archive file formats must be utilised using pg_restore. Script files can be used to rebuild the database on various machines and architectures, as well as on other SQL database solutions with some adjustments. Feed it to psql to restore from such a script. Script dumps are text files that include the SQL commands needed to restore the database to the state it was in when it was saved. Use pg_dumpall to backup global objects that are shared by all databases in a cluster, such as roles and tablespaces.ĭump files can be saved as scripts or archive files. Pg dump only dumps one database at a time. Other users are not prevented from accessing the database via pg_dump (readers or writers). Even if the database is in use at the same time, it creates consistent backups. Pg_dump is a backup tool for PostgreSQL databases. To learn more about PostgreSQL, you can check the official website here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |