Search Postgresql Archives

Re: Using pg_dump and pg_restore

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark <mark@xxxxxxxxxxx> writes:
> So far we have tried normal switches on the end of pg_dump, including 
> -Fc, -c, C, with corresponding switches on the pg_restore command.  When 
> the restore actually executes, it does not fully drop the DB prior to 
> restoration so any test tables added to the DB after a dump are still 
> there after a restore.

I think you want to drop the database explicitly.  Something like

	pg_dump -Fc mydb >mydb.dump
	...
	dropdb mydb
	pg_restore -C -d template1 mydb.dump

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux