postgresql copy database to for offline use

2k Views Asked by At

I was wondering if there is a way to copy a database so it can be used locally on a computer. Without the need of internet. I am using pgAdmin as IDE, but could not find a function there that achieves this. I did look around, but the solutions I found kept the newly copied database on the existing server.

I'm not even 100% sure this is possible without setting up a server locally.

Any help / advice is appreciated.

1

There are 1 best solutions below

0
On

You will need to set up a server locally, then use pgadmin3 to backup your database, and restore it on your local server. I assume this is for development purposes. For production purposes, synchronizing the data is a big issue and something you want to avoid.

To back up the db, right click on the db and click backup database. Then select the format (ideally plain), and then restore on your computer.