Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you do mysqldump in postgresql?

Tags:

postgresql

And how do I restore from my dump back to the db?

like image 715
flybywire Avatar asked Feb 17 '09 16:02

flybywire


People also ask

Can I import MySQL dump to PostgreSQL?

It is not possible to import an Oracle (binary) dump to PostgreSQL.

How do I run Mysqldump?

To dump/export a MySQL database, execute the following command in the Windows command prompt: mysqldump -u username -p dbname > filename. sql . After entering that command you will be prompted for your password.


2 Answers

You should have a look at the pg_dump and pg_restore commands.

pg_dump - extract a PostgreSQL database into a script file or other archive file.

pg_restore - restore a PostgreSQL database from an archive file created by pg_dump.
like image 76
claf Avatar answered Oct 18 '22 22:10

claf


Please look at pg_dump(1) and pg_restore(1).

like image 6
Keltia Avatar answered Oct 18 '22 21:10

Keltia