Migration cacti 0.8.7g to cacti 0.8.8a

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

Moderators: Developers, Moderators

Post Reply
agus90
Posts: 5
Joined: Tue Aug 13, 2013 10:26 am

Migration cacti 0.8.7g to cacti 0.8.8a

Post by agus90 »

Hi there! Please i need your help ASAP! I'm trying to migrate my graphs and history from an old cacti 0.8.7g (on Fedora 14 - 32bits) to a new server with cacti 0.8.8a (on CentOS 6.4 - 32bits) but don´t understand the procedure at all...

I've generated the db dump on old server with "mysqldump -u root -p cacti > cacti-dump.sql" and after copied in the new one and restored the db with "mysqldump -u root -p cacti < cacti-dump.sql". Then i inserted this lines on mysql cacti db:

MYSQL> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY 'cacti';
MYSQL> FLUSH PRIVILEGES;

After that, i copied all .rrd files on /var/lib/cacti/rra in new server

but it doesn't work...

Please could you help me?

Thanks!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Migration cacti 0.8.7g to cacti 0.8.8a

Post by gandalf »

Migration has been explained every other month - sigh.

Failsave procedure is to first install Cacti on a new server, just from scratch. This way, you can test the basic install and ensure, that everything works fine (e.g. create a host and test polling and graphing and whatever you like).

Then, perform mysqldump on old system and import to new system, thereby replacing the database you've created by the new install. The web interface should show all devices, then (no graphs at this point).

Now, "move" the rrd files. Usually, this will require an rrdtool dump/restore sequence. Scripts for automating this have been published to the cacti docs site, linked at 1st link of my sig.

R.
agus90
Posts: 5
Joined: Tue Aug 13, 2013 10:26 am

Re: Migration cacti 0.8.7g to cacti 0.8.8a

Post by agus90 »

Hi gandalf, i have tested new server adding a testing host with some graphics and it works fine. However, when i export the db dump to new server i can't see my old devices, in fact, i see nothing but the default device (localhost).

Do i need to modify something en db by the version difference?

I will really appreciate your help!

Thanks.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Migration cacti 0.8.7g to cacti 0.8.8a

Post by gandalf »

Did you install a database named "cacti" when doing the new install?

And which command did you use to install the mysqldump, then?

When logging into mysql as database root, what doe sthe following command get you?

Code: Select all

show databases;
Please answer all three questions
R.
agus90
Posts: 5
Joined: Tue Aug 13, 2013 10:26 am

Re: Migration cacti 0.8.7g to cacti 0.8.8a

Post by agus90 »

gandalf wrote:Did you install a database named "cacti" when doing the new install?

And which command did you use to install the mysqldump, then?

When logging into mysql as database root, what doe sthe following command get you?

Code: Select all

show databases;
Please answer all three questions
R.

1- Yes i did
2- #mysql -u root -p -e 'create database cacti'
#mysql -u root -p
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY '(my password)';
mysql> FLUSH privileges;
3- Nothing:
[root@cacti-svr ~]# mysql -u root -p cacti
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 21
Server version: 5.1.69 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases
->
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Migration cacti 0.8.7g to cacti 0.8.8a

Post by gandalf »

agus90 wrote:2- #mysql -u root -p -e 'create database cacti'
#mysql -u root -p
mysql> GRANT ALL ON cacti.* TO cacti@localhost IDENTIFIED BY '(my password)';
mysql> FLUSH privileges;
That was NOT the answer to my second question. This is part of installing the cacti database on the first install.
So please again answer, how you did the restore of the mysql dump.
3- Nothing:
[root@cacti-svr ~]# mysql -u root -p cacti
mysql> show databases
->
I did NOT ask to run

Code: Select all

show databases
but

Code: Select all

show databases;
See the additional ";"?
R.
agus90
Posts: 5
Joined: Tue Aug 13, 2013 10:26 am

Re: Migration cacti 0.8.7g to cacti 0.8.8a

Post by agus90 »

Easy boy, no need to be rude. I wrote how i restored the db in first post: "mysqldump -u root -p cacti < cacti-dump.sql".

I'm sorry i forgot the ";"

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cacti |
| mysql |
| test |
+--------------------+
4 rows in set (0.00 sec)

Regards
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Migration cacti 0.8.7g to cacti 0.8.8a

Post by phalek »

This command will dump the database, not restore it ( hence it's called mysqlDUMP) :

Code: Select all

mysqldump -u root -p cacti < cacti-dump.sql
Try this instead:

Code: Select all

mysql -u root -p cacti < cacti-dump.sql
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
agus90
Posts: 5
Joined: Tue Aug 13, 2013 10:26 am

Re: Migration cacti 0.8.7g to cacti 0.8.8a

Post by agus90 »

phalek wrote:This command will dump the database, not restore it ( hence it's called mysqlDUMP) :

Code: Select all

mysqldump -u root -p cacti < cacti-dump.sql
Try this instead:

Code: Select all

mysql -u root -p cacti < cacti-dump.sql

Thank you phalek this was only i needed. Problem solved!
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Migration cacti 0.8.7g to cacti 0.8.8a

Post by gandalf »

agus90 wrote:Easy boy, no need to be rude.
No intention to be rude. Please accept my excuses if it appeared as such.
I wrote how i restored the db in first post: "mysqldump -u root -p cacti < cacti-dump.sql".
As phaleks post pointed out, you now see the difference. That's simply why I asked.
And please understand, that a significant amount of my posts stems from asking things like this. I try to phrase most exactly as I'm able to, taking my limited knowledge of the english language into account.
I hope all is fine, now
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests