- Aug 9, 2022
- 23
- 3
- 3
- Customer Identifier
- E114627
Please follow these steps to create an SQL dump (backup) of a Postgres SQL database::
Click on “Backup” to start the backup process. Note that completing the backup may take some time. The status of the process is shown as toast notifications in PgAdmin. Click on "View Processes" to verify the backup finished without errors.
The resulting file is a plain-text file with the SQL commands need to recreate your database on the same or on another machine. Such an SQL dump can be restored in PgAdmin4 as follows:
- Open pgAdmin4 via the Start menu and connect to the server where the database is located.
- Right-click on the database you want to backup and select “Backup”.
- Choose a filename for the backup file, for example "mdidemo-dump.sql" in the "General" options tab.
- Select "Plain" as the format of the backup file.
- In the “Data/Objects” tab, select "Pre-Data", "Data" and "Post-Data"; all these options must be set to "Yes".
- Make sure "Blobs" is selected under "Types of objects".
Click on “Backup” to start the backup process. Note that completing the backup may take some time. The status of the process is shown as toast notifications in PgAdmin. Click on "View Processes" to verify the backup finished without errors.
The resulting file is a plain-text file with the SQL commands need to recreate your database on the same or on another machine. Such an SQL dump can be restored in PgAdmin4 as follows:
- Open pgAdmin4 via the Start menu and connect to the server where the database is located.
- Right-click on the database you want to restore the data to
- Select "PSQL Tool" in the "Tools" menu
- Type \i <path-to-dump-file> [ENTER]. Note that the path must be specified with forward slashes, eg. c:/mdidemo-dump.sql.
Attachments
Last edited: