PDA

View Full Version : backup, move DB files, export import, merge ??



jenkulle
04-08-2010, 02:34 AM
Hi,


I'm trying to clear of some space on my computer and I want to move/backup/ do what ever/ with my older DB

I have a couple of DB that I see when I open pgadmin and I would like to know what is the best way to simply put everything on my external hard drive... so it's safe !!

say I have Db1 Db2 Db3 Db4 ... some are pretty large some smaller...

Should I export the hand history, create one big DB, back it up and move it to my Hdrive ... or is it too long of a process?

Should I backup every single one of them and then move all backups?

Should I simply move some files (.db or what ever they are called) without backing it up or because of the size of the files it would take longer then other options any way?

other options I'm not thinking of?


I also have some poker tracker 2 and pt3 DB_loll not using those anymore but I have to keep the stats for some taxes purpose ... is their a way with pgadmin or HEM or other 3rd party software to do something with that ? or I need to redownload them and work it from there?


So basically I have a ton of large DB files that I want to put away once and for all, I don't really care if it all merge into one big DB or not (would be great if I could, but I don't have a month to spend on that) so what are my options

any suggestions comments are appreciate

thanks for your help

netsrak
04-08-2010, 04:31 AM
All the options you asked for are possible, i can't answer which one is the best for you.

1. merging all hands into one database - depends on the number of hands and the performance of your computer. I think you should calculate with an import speed of 30-40 hands / sec. if you are merging them into a new database.

2. Moving the databases: you should do a backup before doing it. The fastest way would be to copy the postgresql data folder to the new harddrive and reconnect, see this FAQ: FAQ - Hold'em Manager Poker Tracking Software :: Move Database to Another Hard Drive or Partition (http://faq.holdemmanager.com/questions/368/Move+Database+to+Another+Hard+Drive+or+Partition)
If that doesn't work you can try to reinstall Postgresql: FAQ - Hold'em Manager Poker Tracking Software :: Reinstall PostgreSQL Preserving Old Database (http://faq.holdemmanager.com/questions/71/Reinstall+PostgreSQL+Preserving+Old+Database)
and if that doesn't work you can restore your Backups to the new Postgresql installation.

3. Your old PT2/PT3 databases: you can access the data directly via the pgadmin query tool with sql statements but i don't think this will help you a lot. So in general to access the data you need to install the programs.

_Loki_
04-08-2010, 08:35 AM
My opinion

Since these old hands are not for use in live play nor for analysis - just for tax archive etc...
Purge all the observed/datamined hands before exporting (or maybe there's an option to only export hands you've played - but I can't find it at the moment ?). This will cut down your export time/file size
I don't know how long a purge takes so maybe in total you don't save much time, but you will save space if that matters to you

If you've got a HUGE amount to export I guess you could export using date filters so that you can split the job up into chunks & do it in your poker down times

jenkulle
04-08-2010, 01:27 PM
yes thanks,

already purge observed HH, vaccum full and reindex all of them at night so it would be as small as possible, knew that this would be the mandatory step to use...


@netsrak : I'm not trying to use those DB anymore, just store them in case I need them later, so can I just move the postgre folder without reconnect or it will corrupt something?

cant I just move the backup file it create or I should keep the original, I'm a little confused about that...

and after it is moved, what files can I safely delete to keep only my 2010 DB? it's called 2010... is that easy enough not to miss?

morny
04-08-2010, 04:57 PM
Just moving the database folder is not a good option, its probably the most difficult way and most likely to fail although it is the quickest way

Backing up the databases would be more reliable but sometimes restoring databases can fail occasionally and its also a little slower than moving the data folder

Keeping the Hand Histories archived is the probably the slowest method as youll probably need to export all the hands if you dont have the originals and youll also need to reimport the hands if you need them in future however its the most reliable way and probably 99.9% reliable

So it depends on what you want to do