Masthead

Moving PostgreSQL Databases (Backup and Restore)

Introduction

You can move entire PostgreSQL databases rather easily by backing them up to a file and then restoring that file to another database.

  1. Open PostgreSQL and navigate to your database.
  2. Right click on your database and select "Backup..." from the drop down menu. There should be a [...] icon you can click on to specify the directory you want to save in. This can be the desktop or a shared drive.
  3. When completed, copy the backup folder to where the other database can access it, if needed.
  4. Open PostgreSQL on your computer and add a new database. Don't add any columns, just leave it empty.
  5. Right click on the new database and click on "Restore..."; navigate to the folder you saved the Backup file to, you may have to select "all files" in the right hand drop down menu to be able to see the file. Click restore, and you may see an error message but just ignore it and examine your tables to see if everything uploaded.

This was contributed by Melissa Kimble.

More Resources

SchoonerTurtles Web Site

© Copyright 2018 HSU - All rights reserved.