Difference between revisions of "Import PostgreSQL Database Dump File"
Jump to navigation
Jump to search
m (Gejor moved page Import PostgreSQL Database to Import PostgreSQL Database Dump File without leaving a redirect: Renaming tittle) |
|||
| Line 12: | Line 12: | ||
Note : | Note : | ||
| − | * username: The username to log on to | + | * username: The username to log on to PostgreSQL database. |
| − | * hostname: The hostname of the | + | * hostname: The hostname of the PostgreSQL database. |
| − | * port: The port number of the | + | * port: The port number of the PostgreSQL database. |
| − | * desintationdb: The | + | * desintationdb: The PostgreSQL database name. |
* dumpfilename: The name of the backup file to be restored. | * dumpfilename: The name of the backup file to be restored. | ||
Revision as of 13:22, 14 October 2019
Purpose
This topic describes how to use the psql command to restore the PostgreSQL data backup files to PostGreSQL DB.
Import the Dump File
Just run below command and change it with the database value.
[root@gejoreuy ~]# psql -U username -h hostname -d desintationdb -p port -f dumpfilename.sql
Note :
- username: The username to log on to PostgreSQL database.
- hostname: The hostname of the PostgreSQL database.
- port: The port number of the PostgreSQL database.
- desintationdb: The PostgreSQL database name.
- dumpfilename: The name of the backup file to be restored.