Re: problem with recreating database with export
От
Leif Biberg Kristensen
Тема
Re: problem with recreating database with export
Дата
Msg-id
201209272329.04706.leif@solumslekt.org
Ответ на
Re: problem with recreating database with export (Dennis Gearon)
Список
Дерево обсуждения
Re: problem with recreating database with export Jasen Betts <jasen@xnet.co.nz>
Torsdag 27. september 2012 16.55.15 skrev Dennis Gearon :
>
> To anyone reading this in the future, if you have problems importing a
> plain text database export, it is usually impossible to do:
> psql -d some_dbase -f the_backup.sql. I don't know why. What works is doing
> 'cd ./the_files_directory', going INTO psql command line, then issuing '\i
> the_backup.sql', and it's really fast. 8 seconds for 128 mbyte file.
>
> PS,do this as user 'postgres' on the system.
>
FWIW, here are a few relevant lines from my reload.sh script, which I have
been using since version 7.4, and which is working perfectly:
dropdb $DB
createdb --encoding=UNICODE $DB
psql -U postgres -d $DB -f $INFILE > restore.log 2>&1
Note that I'm running this as a regular postgres user, whose only privilege is
to create new databases.
regards, Leif
В списке pgsql-general по дате отправления