Restoring to new database kills off old database
Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member
    Join Date
    Sep 2010
    Posts
    14

    Default Restoring to new database kills off old database

    I had a problem where one of my tables was corrupted in a way that didn't affect HEM functions, but the database could not be backuped after that. So I thought that I can do a restore, import hands from archive and compare the notes to see if I have got everything. So, when I did a restore to a new database, to my surprise the old database had disappeared.

    This bug can be reproduced with 1.11.04 with following steps:

    1. Make a backup of your database.
    2. Restore the backup to same computer (backup needs to have the same database name as the database that will be deleted from PostGreSQL). If you have a HoldemManager-database in the backup and you restore to a new database called HEM, if there is already a HoldemManager-database on the server, it will be deleted.
    3. After backup has been successfully restored, your database has been deleted (in this example, HoldemManager database would be deleted, but there would be a new database called HEM).

    In my opinion this is a quite critical bug in the restore tool. Restoring anything from backups should NEVER result in data loss. If backup & restore tool can't be trusted, it's as good as it would not exist.

  2. #2
    HM Support netsrak's Avatar
    Join Date
    Feb 2009
    Location
    Germany
    Posts
    25,795

    Default

    Thanks, i'll forward it.

  3. #3
    Senior Member B-Money's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    819

    Default

    I'm clear on what you are claiming, but when I follow your steps this image is my result.

    • Here I backed up my Winamax Database
    • When I restore the database I chose to "overwrite" old Database
    • When it prompted me to rename my database I left that box alone so it used the exact same Winamax name.


    As you can see I now have 2 "Winamax" databases. The old one that was overwritten. Not overwritten, just has a name change, and my new Winamax database.

    There's also options to not overwrite your database when restoring your database. Even if you chose to overwrite we give another prompt to rename your new database. Pretty sure I followed the path that could potentially delete your database but when I designed this with the Programmer we used the rule you talk about. NEVER DELETE DATA.

    Is there a different method you used to make your old database disappear?
    You also say it deleted your "HoldemManager" database. As you can see in the screen mine is still there and intact at the top.

    -B

  4. #4
    Junior Member
    Join Date
    Sep 2010
    Posts
    14

    Default

    I should probably have been even more clear on my first post.

    I did not try to overwrite my old database, I restored the database under a new name. It doesn't ask anywhere do I want to overwrite the old one when I do it like that. It doesn't overwrite the old database, it destroys the old database.

    I have a database on my computer named HoldemManager.
    I make a backup.
    I need to restore the database to my computer.
    My old database still works, but not perfectly, I would like it to remain.
    I restore my database under a new name, HEM.
    End result, there's only a database named HEM remaining in the PostGreSQL server.

    I made a small test database, where I imported only one day's hands and will provide the following pictures on my settings and what kind of databases there are on my PostGreSQL-database during the process. I'm sorry that I used Finnish pgAdmin III to do these pictures, I didn't find anywhere how I could get the software to use English. "Tietokannat" means "Databases" in English.

    First image, Backup.png shows my backup settings.
    Second image, Restoresettings.png shows my restore settings before pressing start restore.
    Third image, RestoringToHoldemManagerTest.png shows that I restore to a new database and have given it a distinctive name that is not a database name I already have on my PostGreSQL server.
    Fourth image, DuringRestore.png shows what happens during the restore, I had only time to refresh my database list in pgAdmin III (I had such a small database that it restored it in a few seconds) and it shows that it uses a tmp database to restore the database. So even when it says "Finished restore" in Holdem Manager Backup, pgAdmin database list has been updated during the restore.
    Fifth image, AfterRestore.png shows what is the situation after restore. As you can see from my pgAdmin database listing, the HMTest-database has been deleted. There's no confirmation dialogs.

    Can you please now take this report seriously, or do I need to do a video for you to believe that your restore tool actually can delete data without confirmation dialogs?

  5. #5
    Senior Member B-Money's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    819

    Default

    Thanks,

    I was able to duplicate this. I have the contractor who wrote the tool scheduled to do some cleanup on the tool starting the week of the 19th.

    I'll make sure this is in there.

    I noticed it only deleted the database that it restored. So everything should still be there if the restore process was a success, right? Even so, you are correct, it should never remove a database like that without some kind of warning at least. I'll make sure it's fixed in his pass at fixing other bugs related to it.

    Thanks for the detailed instructions.

    -B

  6. #6
    Junior Member
    Join Date
    Sep 2010
    Posts
    14

    Default

    Quote Originally Posted by B-Money View Post
    I was able to duplicate this. I have the contractor who wrote the tool scheduled to do some cleanup on the tool starting the week of the 19th.

    I'll make sure this is in there.
    Great.

    I noticed it only deleted the database that it restored. So everything should still be there if the restore process was a success, right? Even so, you are correct, it should never remove a database like that without some kind of warning at least. I'll make sure it's fixed in his pass at fixing other bugs related to it.
    You're right, that if you make a backup and instantly make a restore, you don't lose any data if restore was successful. It only needs a database that is named the same in the backups than exists only on the server, it doesn't compare if they have exactly the same data before removing the database. Think about what happens if you restore a backup you made earlier to the same computer. If you would have for example two weeks old backup, you would have two weeks old data even if restore process was a success. In my case I think I lost only notes made to HM database, I'm not sure about did I lose any hands there. So I have first hand experience that this can result in lost data.
    Last edited by JtX; 09-10-2010 at 02:22 PM.

  7. #7
    Member
    Join Date
    Nov 2009
    Posts
    30

    Unhappy after backup and restore.....lost player names?

    I did a backup and restore of my database.
    Now I can not find my player name (or any player name).

    I have optimized and then reindexed the database, same result.

    Tried an export of hands. Nothing there now.

    The database is there, but nothing is showing in HEM.

    I have 3 backups from this last week. I was not worried about losing data in the process. Now I am worried that I lost my info for the last year.
    VERSION: 1.11.05 beta 11
    Last edited by HowdyDoodee; 09-12-2010 at 04:48 PM. Reason: VERSION: 1.11.05 beta 11

  8. #8
    Member
    Join Date
    Nov 2009
    Posts
    30

    Default

    As a test, I have tried to use a table scanner.
    All players are unknown (no stats).

    Plan B: I have requested complete hand-histories from Pokerstars. I am going to rebuild the database. I cannot wait a week for the BackupUtility guy to get a fix.

    This is a disaster for the Backup&Restore utility. It cannot be trusted. I am really concerned about this.
    Last edited by HowdyDoodee; 09-12-2010 at 06:21 PM.

  9. #9
    Senior Member B-Money's Avatar
    Join Date
    Dec 2009
    Location
    USA
    Posts
    819

    Default

    Quote Originally Posted by HowdyDoodee View Post
    As a test, I have tried to use a table scanner.
    All players are unknown (no stats).

    Plan B: I have requested complete hand-histories from Pokerstars. I am going to rebuild the database. I cannot wait a week for the BackupUtility guy to get a fix.

    This is a disaster for the Backup&Restore utility. It cannot be trusted. I am really concerned about this.
    Are you positive HM is set to use the new database you just restored? This would be the first report of a restored database not having any players.

    • Did you get any errors when you backed everything up?
    • Did you get any errors when you restored the database?
    • When you backed up everything did you let it finish or did you stop it early?
    • How many hands were in your backed up database? IE, do you mine hands?


    I wouldn't mind checking things out on a Team Viewer session if you can't figure it out. Send me a PM with your SKYPE info if this interests you.

  10. #10
    Member
    Join Date
    Nov 2009
    Posts
    30

    Default

    Quote Originally Posted by B-Money View Post
    Are you positive HM is set to use the new database you just restored? This would be the first report of a restored database not having any players.

    • Did you get any errors when you backed everything up?
    • Did you get any errors when you restored the database?
    • When you backed up everything did you let it finish or did you stop it early?
    • How many hands were in your backed up database? IE, do you mine hands?


    I wouldn't mind checking things out on a Team Viewer session if you can't figure it out. Send me a PM with your SKYPE info if this interests you.
    Absolutely positive it was using the database. In fact, importing old hands showed up as duplicates.

    Zero errors in backup or restore.

    I usually kick off the backup after I am done with the computer (and walk away). I know not to mess with this process, unless I am restarting it.

    412+K hands. I finally just asked Pokerstars for the hands, and spent the rest of the evening rebuilding the database.


    If this will help you, I will do the skype/teamviewer. But I have already rebuilt the database. I'd just like to know that this utility can be trusted in the future.
    Thanks.

Similar Threads

  1. Restoring a Database Using backup and restore Made a different database disappear!
    By onlymymissiscallsmedonkey in forum Manager General
    Replies: 3
    Last Post: 07-12-2010, 08:56 PM
  2. Replies: 5
    Last Post: 06-24-2010, 09:36 AM
  3. Trouble restoring database
    By SuperSized in forum Manager General
    Replies: 11
    Last Post: 03-07-2010, 06:42 PM
  4. Trouble with restoring Database
    By Rookie72 in forum Manager General
    Replies: 1
    Last Post: 10-04-2009, 07:29 AM
  5. Need help restoring database
    By osiris873 in forum Manager General
    Replies: 5
    Last Post: 10-21-2008, 08:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •