Flink / dokku-psql-single-container

Plugin for dokku that provides a Postgresql server in a single container
MIT License
51 stars 9 forks source link

Not all pg_dump output formats supported by psql:restore #18

Closed lastmjs closed 9 years ago

lastmjs commented 9 years ago

It says in the commands info for psql:restore

psql:restore     <app> < <filename.*> Restore database to <app> from any format exported by pg_dump

But not all formats exported by pg_dump are supported. I dumped to a sql script file, and this is what happens when I try to run psql:restore

pg_restore: [archiver] input file appears to be a text format dump. Please use psql.
Flink commented 9 years ago

Ah yes you’re right, from the pg_restore man:

pg_restore is a utility for restoring a PostgreSQL database from an archive created by pg_dump(1) in one of the non-plain-text formats

I will fix the help output. To restore a plain SQL file, I think this should work: dokku psql:console < ~/dump.sql

Flink commented 9 years ago

Updated in latest master :)

flamontagne commented 9 years ago

I tried dokku psql:console myapp < dump.sql but it didn't work. Nothing happens. I'm quite stuck now, I have now idea how I can restore my backup. Somebody can help?

Flink commented 9 years ago

@flamontagne this should be fixed in latest master

flamontagne commented 9 years ago

You're the best, thanks!