0

In a project that I support, we already have PostgreSQL database in different environments - Development, Integration and. production. I know we can take a back up of Integration database with PG_Dump and restore it to Development in order to sync those databases.

However, I want to understand if I can use the back up file from PG_dump to create the database locally in my system?

4
  • 1,Why you need to sync local database with the online? Commented Oct 30, 2020 at 2:06
  • Sure, a local database is in no way different from a remote one. Do you encounter any problems? If, yes, please describe them in your question. Commented Oct 30, 2020 at 3:31
  • @Spikie This is a new application that I am supporting and I would like to create a local database using the backup of the database in the server, specifically Development. So that I could debug it locally. Commented Oct 30, 2020 at 15:13
  • @LaurenzAlbe There is no specific problem, I just wanted to know if I can use the backup file from the database in the server and create it in my local machine. Commented Oct 30, 2020 at 15:16

1 Answer 1

1

A "local database" is not substantially different from a "remote database", so yes, that should work.

As always, note that restoring a dump on a lower PostgreSQL version than the one where it was taken is not supported (and will often fail).

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.