Cacti moving from one server to another
Moderators: Developers, Moderators
Cacti moving from one server to another
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.
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.
Re: Cacti moving from one server to another
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.
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.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Cacti moving from one server to another
Correct. An rrdtool dump and restore is required to migrate data that has been captured before
R.
R.
Re: Cacti moving from one server to another
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
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.
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Cacti moving from one server to another
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.
Please remember to setup crontab!
Make sure, that "cactiuser" exists and that such a user is defined to mysql
R.
Re: Cacti moving from one server to another
Great, thanks.
And the main question is - How reactivate poller? How I can force Cacti to start collecting data?
And the main question is - How reactivate poller? How I can force Cacti to start collecting data?
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Cacti moving from one server to another
As said: by setting up crontab!kazarkin wrote:Great, thanks.
And the main question is - How reactivate poller? How I can force Cacti to start collecting data?
R.
Re: Cacti moving from one server to another
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
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
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Cacti moving from one server to another
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.
It may help to redirect output to a file (e.g. log/poller.log) instead of /dev/null to watch out for errors
R.
Re: Cacti moving from one server to another
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:
But could you please help me one more time.
Data are collecting now but the graphs are sporadic like this:
- Attachments
-
- graph_image.JPG (33.93 KiB) Viewed 1320 times
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Cacti moving from one server to another
There are many possible root causes. Please see 2nd link of my sig for some of them
R.
R.
Who is online
Users browsing this forum: No registered users and 1 guest