Home » Forums » DBManager General
 
After attempting database migration, I discover one of my tables purged. (1276 previews)
After attempting database migration, I discover one of my tables purged. Posted in 15th, 01/2006 01:27 by j_schatz
Support,

Horrors! I started to work on my project this morning and discovered that the entire contents of one of my key tables has been purged (the structure is still but the data is gone). This table has taken me a week to populate! It almost seems like I had clicked on "empty table" but I did not. All of my other tables still contain their data. The last thing I remember doing was trying to do another dababase migration (my local PC has the my latest work plus I was trying to get the queries to migrage) from my local PC to the web server. I remember the migration failing because the target tables already existed (from a previous migration). If I am doing a second migration, do I need to drop the database on the target end first?

Fortunately, I have been doing database backups (server selected) on a regular basis. After discovering my lost data, I tried a restore on my local PC but it complains that the database tables already exist. Am I supposed to drop my database first? That is a scary thought. How can I just restore the data? I also have done a "dump table" command (desired table selected) for the table that I have since lost. Is that a better way to do the recover?

1. How should I best recover from this?
2. What caused my data to become lost?
3. Is there a bug (I scaned the bug forum but did not find anything) relating to an aborted data migration causing source tables to be purged?

Thanks.

Jim /
Re: After attempting database migration, I discover one of my tables purged. Posted in 15th, 01/2006 03:06 by j_schatz
Support,

I am recovered! I decided to take a chanch and purge the table where I had lost my data. I then right clicked over my database icon in the servers tab. The popup had a "Load" option so I clicked it. I then saw all of the dumps that I have done and selected my most recent. It ran for a bit as it was recovering my stuff. After the recovery, I verified that everything workes as before. The key is to purge the table first.

I answered my own question so support does not need to reply on the issue of how to recover. I am still curious how the table became purged in the first place. I sure am glad I back this stuff up every time I make changes.
Jim /
Re: After attempting database migration, I discover one of my tables purged. Posted in 15th, 01/2006 04:16 by support
Hi,

j_schatz wrote:
Support,

Horrors! I started to work on my project this morning and discovered that the entire contents of one of my key tables has been purged (the structure is still but the data is gone). This table has taken me a week to populate! It almost seems like I had clicked on "empty table" but I did not. All of my other tables still contain their data. The last thing I remember doing was trying to do another dababase migration (my local PC has the my latest work plus I was trying to get the queries to migrage) from my local PC to the web server. I remember the migration failing because the target tables already existed (from a previous migration). If I am doing a second migration, do I need to drop the database on the target end first?


There are other ways that can delete the table data. For example for migration you may select if you want to drop the table or delete its data before starting migration the new content. For table emptying DBManager alerts you and ask for confirmation. For all other tasks this is a parameter which you can set. If by any chance you have activated this option DBManager won't ask for confirmation.

j_schatz wrote:
Fortunately, I have been doing database backups (server selected) on a regular basis. After discovering my lost data, I tried a restore on my local PC but it complains that the database tables already exist. Am I supposed to drop my database first? That is a scary thought. How can I just restore the data? I also have done a "dump table" command (desired table selected) for the table that I have since lost. Is that a better way to do the recover?

The backup copies the entire database including the structure and data, if you choose to. See that the Dump Wizard allows you to change this behaviour and select to backup only data. As you have the dumped file in hands you can edit it and remove all CREATE TABLE statements using NOTEPAD. The same applies for table dump only.

j_schatz wrote:
1. How should I best recover from this?
2. What caused my data to become lost?
3. Is there a bug (I scaned the bug forum but did not find anything) relating to an aborted data migration causing source tables to be purged?

Thanks.

Jim /


The best way to import the data back is editing the dumped file as mentioned before. The answer for question 2 is in the first paragraph.
See that this is not a bug. Is the way things are implemented. DBManager generates the backup very compatible with the database engine applications of your choice (MySQL, PostgreSQL, etc). Also the dump wizard (used for backups) can be highly configurable allowing you to choose what and how the database is going to be copied.

- You can copy the structure for some or all objects types. This is very good to backup only tables, only stored procedures and so on.
- You can select to include the data in the backup and optionally select to save the data into CSV format
- It is also possible to backup the data only. See that in this case the database most not be changed or the load may fail. Also it will not check if the data exists prior to importing it.

To get more information about using the dump wizard please check the DBManager's manual in the [Dump Wizard] paper. It there is still doubts about this process, please email-us again.

Best Regards,


Support / DBTools Software
After attempting database migration, I discover one of my tables purged. (1276 previews)
Legends

Topic has Replies
Topic With no Replies
 
Home » Forums » DBManager General