Should a database be cleared before restoration?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jfmays
    New Member
    • May 2013
    • 1

    Should a database be cleared before restoration?

    I have a dumpfile created with pg_dumpall. If I need to restore a database from it to bring it up to date with another database system, do I need to clear out the contents of the database first? I don't want to create duplicate records by pulling in the dumpfile.
  • rski
    Recognized Expert Contributor
    • Dec 2006
    • 700

    #2
    I did not use postgres for a very long time but as far as I remember if you do not use -F then the dump will be sql text file. You can check if the dump contains drop table statements before creating table from dump (I think tables are dropped before recreating).

    Comment

    Working...