KristiLuna
KristiLuna

Reputation: 1903

Import dump file containing a database dump to dbeaver

I have a database dump in thisdb_2022.dump binary file that I'm trying to import to dbeaver, but I haven't found a way to import the database so I can see it.

I found the below in the dbeaver forum but when I try to follow the instructions and create a new connection I don't see any option I can select that will open this document.

https://dbeaver.io/forum/viewtopic.php?f=2&t=895

Edit: The database and version is PostgreSQL 12 . I'm not trying to dump it to an existing db rather I want to create a new one with this dump. the dump command looks like this: pg_dump -h blah.amazonaws.com -Fc -v --dbname="blah2" -f "/tmp/dump/20220203.dump". And it will be the same version PostgreSQL 12

Upvotes: 5

Views: 44872

Answers (2)

Use pg_dump with tar format.

pg_dump --dbname=postgresql://username:[email protected]:5432/dbname --format=t > dump.tar

Afterwards you can restore also in DBeaver tar format.

Upvotes: 0

Adrian Klaver
Adrian Klaver

Reputation: 19684

The easiest way to not use DBeaver at all.

Do:

UPDATED with correct command.

--In psql
CREATE DATABASE new_db;
--Exit psql
--At command line
pg_restore -d new_db -h <the_host> -p <the_port> -U postgres /tmp/dump/20220203.dump

To work in Dbeaver directly see Backup/Restore.

Upvotes: 9

Related Questions