How to restore a PostgreSQL database from dump file in dbeaver?
Asked Answered
C

2

24

In our company we have a dump of PostgreSQL database - file db.sql. It weighs 8 Gigabyte. How to restore this database in DBeaver? And we don't have another databases in DBeaver 7.0.5.

I have digged all Internet and haven't found anything how to do this without another database/

Cumulus answered 17/7, 2020 at 14:2 Comment(2)
Just use psqlEarthbound
We don't have psql(Cumulus
P
27

When you right click on the database you want to restore into, under "Tools" you will find "execute script". This is how you restore a plain-format dump file, which is what db.sql probably is.

This will require you to have psql, but dbeaver will offer to download and install its own copy of it for you.

Parthenon answered 17/7, 2020 at 14:57 Comment(2)
I tried to use it locally with 200mb file and I couldn't do it. DBeaver just freezes for hours... I had to do it from console and it completes in few seconds.Dilks
@Dilks Works for me. You will have to do some basic debugging. What are the OS and versions of everything? What activity is happening (CPU, disk, memory) on server machine? and the client machine?Parthenon
D
5

Create a new DB and right click on the db, click on tools and restore. Choose your dump and import it.

Deprive answered 4/6, 2021 at 6:31 Comment(1)
Have an error "input file appears to be a text format dump. Please use psql". Execute script option works well.Pyrography

© 2022 - 2024 — McMap. All rights reserved.