Hard drive crashed and need to rebuild Cacti system

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
georgej2
Posts: 9
Joined: Thu Sep 05, 2013 2:34 pm

Hard drive crashed and need to rebuild Cacti system

Post by georgej2 »

Our hard drive running Windows7 and Cacti crashed. We were able to recover *some* data off of it. Can someone help us with the minimum data needed to recover the Cacti system to as close to what it was as possible?

We have a somewhat recent backup of the Cacti directory and we were able recover portions of the hard drive but not all. How much is enough to recover the devices and graphs that were defined in the previous system? What directories would we have to have?

Help would be appreciated.

George
jftuga
Posts: 49
Joined: Mon Feb 07, 2011 11:50 am
Location: Athens, GA

Re: Hard drive crashed and need to rebuild Cacti system

Post by jftuga »

Other than the directories, you would also need the Cacti MySQL database. Were you able to recover that?

-John
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Hard drive crashed and need to rebuild Cacti system

Post by BSOD2600 »

Cacti devices/templates/config data -> MySQL
Graph data -> RRDTool .rrd files
georgej2
Posts: 9
Joined: Thu Sep 05, 2013 2:34 pm

Re: Hard drive crashed and need to rebuild Cacti system

Post by georgej2 »

Thank you for your replies. Sorry for the delay in us getting back to you. Having trouble with Win7 and security policy not letting us load FastCGI. As soon as we have resolved this trouble we do have a couple of other questions. Thanks again
georgej2
Posts: 9
Joined: Thu Sep 05, 2013 2:34 pm

Re: Hard drive crashed and need to rebuild Cacti system

Post by georgej2 »

Ok, We have gotten past the install trouble and have a working Cacti albeit with blank data. We have copied the Cacti directory from the crashed drive and it seems to be intact. We're not sure how to bring the SQL database over. We do have the cacti.sql file from the drive that died and have copied it but the devices list is still blank. We followed the 'upgrading Cacti' steps but were not able to get it working. Thoughts?

Thanks.
georgej2
Posts: 9
Joined: Thu Sep 05, 2013 2:34 pm

Re: Hard drive crashed and need to rebuild Cacti system

Post by georgej2 »

We have still not been able to bring the devices and graphs over from the old database. We followed the "Upgrading Cacti" instructions. We did not see how the instructions copied the SQL over to the new installation so we tried executing the mysqldump.....cacti > mysql.cacti instructions from the old database and then the reverse of that i.e. mysqldump......mysql.cacti > cacti in the new one. We still have a blank database. The RRA directory has a whole lot of RRA files since we copied them over from the old database.

Any thoughts would be appreciated.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Hard drive crashed and need to rebuild Cacti system

Post by BSOD2600 »

mysqldump is for... dumping the database to file. To load it use mysql.exe as documented in http://docs.cacti.net/manual:088:1_inst ... tall_mysql
georgej2
Posts: 9
Joined: Thu Sep 05, 2013 2:34 pm

Re: Hard drive crashed and need to rebuild Cacti system

Post by georgej2 »

Thank you. The "upgrading Cacti" document spoke of exporting the data but not importing it. This may need to be updated to provide the *import* steps.

We followed the mysql...... portion of the "Install mysql" document that you spoke of and still have a blank database when we access Cacti. I say blank but I really mean it has a couple of devices in it just not the 600 or so we had before.

We used the commands provided at http://www.pantz.org/software/mysql/mysqlcommands.html to query the cacti.sql file and it looks like we have a mostly empty data base that we have been copying. We need to find a *good* copy of the cacti.sql that we can extract data from.

Specific commands used to look at the database are: (these are executed from the cacti directory, ie. c:\inetpub\wwwroot\cacti)

c:\....cacti>mysql -u cactiuser -p cacti (to load the mysql prompt and load/login to the cacti database)
mysql> use [db name]; (if you want to change databases but it is already cacti because of the first command)
(db name is cacti to select the cacti.sql file ie. use cacti)
mysql> show tables; (to show tables in the database)
mysql> SELECT * FROM [table name]; (to display data in various tables. We looked at the *host* table name)

Don't forget the ; at the end of each command once you're at the mysql prompt!

Thanks again for your time. We'll try to update the post as we progress to migrating the database to the new hard drive,

George
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests