Re: Dump & Load a database???

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

 



>>> On Tue, Aug 21, 2007 at  9:50 AM, in message <12256258.post@xxxxxxxxxxxxxxx>,
smiley2211 <smiley2211@xxxxxxxxx> wrote: 

> Do I have to DROP \ recreate and load the target database (this is what I
> currently do)?  is there a way to just do an IN PLACE load like in other
> RDBMS environments???
> 
> pg_dump proddb | gzip > proddb_082107.sql.gz
> 
> gunzip < proddb_082107.sql.gz | psql -d testdb -f -
 
You might want to consider using one or both of these pg_dump options:
 
  -c, --clean                 clean (drop) schema prior to create
  -C, --create                include commands to create database in dump
 



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux