Thread: restoring a dump
Hello, I have been trying to restore my dump and it seems like it is not working. I put the dump in a tar file and when I untarred it, there are several .dat files, a toc.dat file, and a restore.sql file. I used psql to restore these files into a database. I first started restoring the restore.sql file, then the .dat files, and lastly, the toc.dat. When I did the toc.dat file, I received an error message. These are the pg_dump -C -D -F t > test.tar tar -xvf test.tar psql restore.sql psql test < 19.dat psql test < 20.dat .. and so on psql test < toc.dat This is the error message: ERROR: parser: parse error at or near "pgdmp" CHANGE ERROR: non-existent group "test" ERROR: parser: parse error at or near """ ERROR: parser: parse error at or near """ ERROR: parser: parse error at or near """ ERROR: parser: parse error at or near """ ERROR: parser: parse error at or near """ ERROR: parser: parse error at or near """ ERROR: parser: parse error at or near """ ERROR: parser: parse error at or near """ ERROR: parser: parse error at or near """ I also tried using the pg_restore, but I don't know how that would work on these separate files. Is there another way I can restore the dump? Maybe an easier way than what I have been using? And do I need to restore what is in the toc.dat? Thank you for your help.
Is ther any to set a timeout when execute a sql stmt?? Jie LIANG St. Bernard Software 10350 Science Center Drive Suite 100, San Diego, CA 92121 Office:(858)320-4873 jliang@ipinc.com www.stbernard.com www.ipinc.com
Phuong Ma writes: > pg_dump -C -D -F t > test.tar > tar -xvf test.tar > psql restore.sql > psql test < 19.dat > psql test < 20.dat .. and so on > psql test < toc.dat I believe you're supposed to use pg_restore on the tar file itself. -- Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter
Peter Eisentraut wrote: > > Phuong Ma writes: > > > pg_dump -C -D -F t > test.tar > > tar -xvf test.tar > > psql restore.sql > > psql test < 19.dat > > psql test < 20.dat .. and so on > > psql test < toc.dat > > I believe you're supposed to use pg_restore on the tar file itself. > > -- > Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter I tried using pg_restore, but it did not restore the dump successfully. Maybe it is the syntax I'm using, but I remember reading that you cannot use the pg_restore to restore a dump that uses INSERT. Does anyone know of a way I could undump my db?
Do not understand your question. On 28 Jun 2001 16:32:47 -0700, Phuong Ma wrote: <snip> > I tried using pg_restore, but it did not restore the dump successfully. > Maybe it is the syntax I'm using, but I remember reading that you cannot > use the pg_restore to restore a dump that uses INSERT. Does anyone know What do you mean by "dump that uses INSERT"?a > of a way I could undump my db? > -- Wei Weng Network Software Engineer KenCast Inc.
> Is ther any to set a timeout when execute a sql stmt?? I believe this depends on the interface...for example, in JDBC, it is this: Statement s = new Statement(); s.setQueryTimeout(20); // Sets query timeout to 20 seconds. ... I don't know what other interfaces offer timeouts, but that's where you should look to find out. --Jeremy