Cacti moving from one server to another

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

Moderators: Developers, Moderators

Post Reply
kazarkin
Posts: 10
Joined: Sun Nov 08, 2009 3:00 pm

Cacti moving from one server to another

Post by kazarkin »

Hello everybody.

Could somebody please help and explain the best way how to move Cacti from one server to another.

Now I have Cacti 0.8.7c on RedHat 5.1 on a real physical server.
Also I have many Graph, Data and Host templates for server (Linux&HP-UX), network devices, NetApp storage.

I am going to move Cacti to the virtual RedHat 5.5 server. And if it's possible update version to "g" and install additional plugins.


So, could somebody please kick me to the any manual or explain the process step by step.
May be some important steps. To update version, do I need to install new version and then import sql database and all my templates?
Or I need to install the same version and then update to the latest one.

Thanks in advanced.
clayman2
Posts: 19
Joined: Mon Sep 27, 2010 5:36 am
Location: New York

Re: Cacti moving from one server to another

Post by clayman2 »

I would say get the virtual up, dump your mysql db, and backup your web dir

import your mysql dump on the virtual and copy your web dir backup to exact same path as the old cacti server, verify everything works properly, if it does, then proceed with the upgrade, if it doesn't then troubleshoot. I am no expert but thats what I would do.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti moving from one server to another

Post by gandalf »

Correct. An rrdtool dump and restore is required to migrate data that has been captured before
R.
kazarkin
Posts: 10
Joined: Sun Nov 08, 2009 3:00 pm

Re: Cacti moving from one server to another

Post by kazarkin »

Thank you guys.

Please correct my plan if it's wrong:

1. Up new virtual server (new version of OS, MySQL, PHP and RRDTool will be installed)
2. Backup old MySQL database by dump
/usr/bin/mysqldump -u root cacti > cacti_backup.sql
3. Import all rrd files to xml
ls -1 *.rrd | awk '{print "rrdtool dump "$1" > "$1".xml"}' | sh -x
4. Create empty "cacti" database in MySQL and then import old database
mysqladmin -u root create cacti
mysql cacti < cacti_backup.sql
5. Convert xml files back to rrd
ls -1 *.rrd.xml | sed 's/\.xml//' | awk '{print "rrdtool restore "$1".xml "$1}' | sh -x
Last edited by kazarkin on Sat Oct 23, 2010 3:50 pm, edited 2 times in total.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti moving from one server to another

Post by gandalf »

Looks fine. Of course, you will have to copy the cacti-code as well.
Please remember to setup crontab!
Make sure, that "cactiuser" exists and that such a user is defined to mysql
R.
kazarkin
Posts: 10
Joined: Sun Nov 08, 2009 3:00 pm

Re: Cacti moving from one server to another

Post by kazarkin »

Great, thanks.

And the main question is - How reactivate poller? How I can force Cacti to start collecting data?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti moving from one server to another

Post by gandalf »

kazarkin wrote:Great, thanks.

And the main question is - How reactivate poller? How I can force Cacti to start collecting data?
As said: by setting up crontab!
R.
kazarkin
Posts: 10
Joined: Sun Nov 08, 2009 3:00 pm

Re: Cacti moving from one server to another

Post by kazarkin »

Well, I did as you suggested.
But rrd files are not updating.
I have set up necessary permissions for rra folder.

Crontab - */5 * * * * php /var/www/html/cacti/poller.php > /dev/null 2>&1
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti moving from one server to another

Post by gandalf »

Login as cactiuser and run the poller manually.
It may help to redirect output to a file (e.g. log/poller.log) instead of /dev/null to watch out for errors
R.
kazarkin
Posts: 10
Joined: Sun Nov 08, 2009 3:00 pm

Re: Cacti moving from one server to another

Post by kazarkin »

Well, I have resolve the issue with updating rrd files.

But could you please help me one more time.
Data are collecting now but the graphs are sporadic like this:
Attachments
graph_image.JPG
graph_image.JPG (33.93 KiB) Viewed 1324 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Cacti moving from one server to another

Post by gandalf »

There are many possible root causes. Please see 2nd link of my sig for some of them
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests