![]() pg_dump will back up the entire database, then pg_restore will then select which parts of the database to archive or restore. Using the archive format with pg_dump and bringing it back in with pg_restore allows for more specific restoration. There is also flexibility when it comes to archiving and transferring information. The user can even reorder items before restoring them, which makes this format ideal for porting the database across architectures. While not as generic, this format allows the user to be selective of what gets restored. Script files work on other databases, and can be used with different machines and architectures.Ī few modifications in the options even allows this file type to be used with other SQL database products.Īrchive file formats aren't as universal and must be used by pg_restore to get the database back. Feeding the file to psql will restore these scripts. A script dump is a plain text file that contains SQL commands which can reconstruct the database to the exact state it was in when it was saved. The outputs are either script or archive files. If there is a cluster of databases that need to be dumped, scroll down to the pg_dumpall command. Readers, writers, and other users won't be blocked from using the database while using pg_dump. The utility makes consistent backups even if the database is being used concurrently. This utility is for backing up databases. The pg_dump command extracts a PostgreSQL database into a script file or another archive file. Try SimpleBackups Now → The pg_dump command There will also have to be a root password setup on your server.ĭon't want to maintain you backup scripts? It's important to note that running these commands assumes that you already have a server up and running the Linux operating system, and have PostgreSQL installed. To help you understand more about these processes we will cover what they are and work through some examples. ![]() ![]() The system is open-source and offers a wide array of tools to accomplish tasks quickly. PostgreSQL is a relational database system that is widely used. ![]() Using these utilities, administrators are able to create a full, incremental, or continuous backup either locally or remotely. Automated PostgreSQL Backups as a service. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |