dokku-pg-plugin icon indicating copy to clipboard operation
dokku-pg-plugin copied to clipboard

-F/--format option for dump/restore command

Open invl opened this issue 10 years ago • 2 comments

sql format could be large and painful to sync between servers.

Since we now have postgresql:console, postgresql:restore probably should use pg_dump's counterpart pg_restore instead of psql

invl avatar Sep 24 '14 07:09 invl

+1 Absolutely, heroku for instance gives you just the small format

hakunin avatar Nov 04 '14 14:11 hakunin

Ha, just found an easy way of working this around:

pg_restore -O latest.dump | dokku postgresql:restore <db_name>

The pg_restore command will gladly uncompress the file for you and you can feed it to restore in pure sql via pipe.

Note: the -O option means the database should not export information about the old owner.

hakunin avatar Nov 04 '14 15:11 hakunin