Help, Data Source names are gone

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
ttyler
Posts: 4
Joined: Mon May 06, 2002 10:41 am
Location: Palm Bay, FL.

Help, Data Source names are gone

Post by ttyler »

This morning I deleted a Data Source name, and it deleted them all. It left the Data Inputs. That is, the parents are all gone. There are no cron entries anymore.

It looks like the damage was done to the rrd_ds table.

Has anyone ever encountered this? I have over 100 data sources and am hoping there is a simple way to repair this. I don't know sql very well, but I think I can see how to do this manually. It looks like ID should refer to SubDSID for parent->child relationships, and that IsParent should be set for parents. Otherwise everything else stays the same? What is SrcID and why is it set to 35 when I add new sources from within cacti?

tim
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

I think your problem has something to do with this one:

http://www.raxnet.net/board/viewtopic.php?t=377

And if that is the case, I think I found the problem and solved it. To get this correct, you were deleting a data source when this happened? The other user was adding a new data source. Could be related though.

I can't think of any easy way to restore lost MySQL data unless you backup your MySQL tables. Sorry about that...

I really think what is happening is cacti goes to delete all of the "child" data sources when a parent gets deleted. But somehow that ID gets messed up and cacti ends up deleting a whole bunch of other stuff.

Regardless, I fixed what could be causing this to happen for the next version, which should be released very soon.

-Ian
ttyler
Posts: 4
Joined: Mon May 06, 2002 10:41 am
Location: Palm Bay, FL.

Post by ttyler »

Correct, I was deleting a data source. All I was left with were the children in the rrd_ds table. So everything where subdsid = 0 was gone.

I was able to recover the data manually, and I learned a little bit about sql, cacti, and mysql in the process. It just took an hour or so, and now I back up the database.

Btw, it seems like it might not be a bad thing to consider breaking up rrd_ds, someday in the future, to rrd_ds_parent and rrd_ds_child and move the one-to-many relationship across tables. There may be more going on here than I realize, but that was just a thought as I was working with that table.

thanks
tim
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest