Migrate a PostgreSQL database to another database server

To migrate a PostgreSQL database to another database server

Back up the source database

  • Start pgAdmin4
  • Connect to the source database server
  • Right-click the dayabase and select Backup

  • On the General tab click the folder icon to set the backup file location and enter the file name. Set the format to Custom,

  • On the Data Options tab enable Pre-data, Data, Post-data

  • On the Query Options tab enable Use INSERT Commands

  • Click the Backup button

Restore the database on the target server

  • Connect to the target database server
  • Right-click the Databases item and select Create, Database…

  • Enter the name of the database and click the Save button

  • Right-click the name of the database and select Restore…

  • Click the folder icon to select the backup file and click the Restore button

Leave a comment

Your email address will not be published. Required fields are marked *