Duplicate database

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Duplicate database

Postby Parket » Thu Jan 12, 2012 6:36 am

I'm splitting up my single database in separate databases per year until 2010, such that I have the historical data in separate databases and therefore have a smaller active database.

I was advised to do this with Export + Import, but this doesn't work well at all. For some reason the export primarily seems to export from the stored HH rather than from the database records themselves. This results in errors when importing the export in the new database, and as a consequence the new database will be missing hands that were in the original. Also, tournament results seem to be missing for some networks as well (e.g. I exported all my 2010 tournaments for Cake, and when I imported it in the new database, all winnings were gone - this seems similar to the PT4 import issue).

In all, an export+import is definitely not duplicating one-on-one the original database. So instead, I'm now thinking of entirely duplicating the original database, and then purging the data that I don't want. I realize that this will be a very lengthy process, as I'll be purging the majority of data in the new database, but it seems to me that this is the only way to be guaranteed to have the exact same data as in my main database.

Q: what is the best way to duplicate ? Can I create a backup via Database Management, only select Backup Databases, and then Restore it in a new database ? Or does the Restore always take the original database name/instance ?
Parket
 
Posts: 367
Joined: Mon Mar 24, 2008 1:03 pm

Re: Duplicate database

Postby Parket » Thu Jan 12, 2012 6:59 am

Nevermind, gave it a shot to see what happens, and PT3 indeed gives the possibility to Restore into a new database.
Parket
 
Posts: 367
Joined: Mon Mar 24, 2008 1:03 pm


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 41 guests

cron