Migration requisites
Moderators: Developers, Moderators
Migration requisites
Hi, I need to move an old Cacti installation to a new one, on a new machine.
I would like to do a version update also, from 0.8.6d to 0.8.6h, maintaining all the data from my actual rrd files and graphs.
Do you know any guide that will let me go on the right direction or i'm asking for too much ?
Thanks in advance,
Leonardo Rocco.
I would like to do a version update also, from 0.8.6d to 0.8.6h, maintaining all the data from my actual rrd files and graphs.
Do you know any guide that will let me go on the right direction or i'm asking for too much ?
Thanks in advance,
Leonardo Rocco.
Migrating cacti to a new server/location.
I know of no guide, but I've done this a few times. I would not upgrade cacti until you have successfully migrated your 0.8.6d version over and you know for sure it's 100% properly working. It's better to only deal with one potential problem at a time so you know where the fault lies.
For the most part, you just need to make sure you have a recent version of rrdtool, php, apache, etc. on the new system before you start.
Make sure you make backups of everything you modify or touch!
Stop your poller script on the old server and shut off the cacti interface, or make sure no one is going to be making changes while you do this.
Use mysqldump to make a dump of your cacti database. Usually it's something like:
If you had any custom templates installed in your cacti installation, it's possible that some datasources or templates might have been pointing to hardcoded locations on your system. You will need to use a text editor to search and replace and change all the old path locations to the new cacti location. If cacti is going in the same place on the new server, this might not be an issue. In any case, check your sql dump to make sure your paths and such look OK. If you are proficient in SQL, you can just make the changes in place in your database for each affected table.
Copy your current cacti installation to the new server and appropriately configure apache, etc. for the new location.
Import your cactidb.sql file into your new database server or re-import if you had to make changes to paths, but are using the same server.
Restart Apache and go to your Cacti Console -> Settings and make sure your RRDTool version is correctly selected and all paths under the Paths tab look correct.
Turn your poller back on, on the new server.
If things go well and you start seeing data again, on the new server, you can consider upgrading to the latest Cacti version.
For the most part, you just need to make sure you have a recent version of rrdtool, php, apache, etc. on the new system before you start.
Make sure you make backups of everything you modify or touch!
Stop your poller script on the old server and shut off the cacti interface, or make sure no one is going to be making changes while you do this.
Use mysqldump to make a dump of your cacti database. Usually it's something like:
Code: Select all
mysqldump -h locahost -u cactiuser -pcactipass --add-drop-table cactidb > cactidb.sql
Copy your current cacti installation to the new server and appropriately configure apache, etc. for the new location.
Import your cactidb.sql file into your new database server or re-import if you had to make changes to paths, but are using the same server.
Restart Apache and go to your Cacti Console -> Settings and make sure your RRDTool version is correctly selected and all paths under the Paths tab look correct.
Turn your poller back on, on the new server.
If things go well and you start seeing data again, on the new server, you can consider upgrading to the latest Cacti version.
-Daniel
[url=http://dealnews.com/developers/cacti/memcached.html]memcached Template[/url] - Version 1.0
[url=http://dealnews.com/developers/]dealnews.com/developers[/url] - Useful scripts and Cacti templates.
[url=http://dealnews.com/]dealnews.com[/url] - How to go broke saving money.
[url=http://dealnews.com/developers/cacti/memcached.html]memcached Template[/url] - Version 1.0
[url=http://dealnews.com/developers/]dealnews.com/developers[/url] - Useful scripts and Cacti templates.
[url=http://dealnews.com/]dealnews.com[/url] - How to go broke saving money.
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
I always suggest running both boxes in parallel, if you can.
This way you don't loose any data if you have issue with the new box.
This way you don't loose any data if you have issue with the new box.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Thank you very much for the answer, is always good to know what potential problems I may face. I still have some doubts anyway.
As far as I know, the actual data is stored on rrd files, and cacti always generate the graphs looking at those rrd files right ? You spoke about migrating MySql database, but you didn't say anything about the rrd files. For example, all query results are stored on mysql?? or they are only stored on rrd files ?
If I copy those files cacti automatically will take those files and start to put data on them?
thanks in advance for the great help
Leonardo.
As far as I know, the actual data is stored on rrd files, and cacti always generate the graphs looking at those rrd files right ? You spoke about migrating MySql database, but you didn't say anything about the rrd files. For example, all query results are stored on mysql?? or they are only stored on rrd files ?
If I copy those files cacti automatically will take those files and start to put data on them?
thanks in advance for the great help
Leonardo.
When I said, "Copy your current cacti installation to the new server...", I meant your entire cacti installation directory. This includes the <cacti path>/rra/ directory where your rrd files are stored. Copying your cacti installation directory and importing your mysql dump will copy everything needed for a normal cacti installation.leorocco wrote:As far as I know, the actual data is stored on rrd files, and cacti always generate the graphs looking at those rrd files right ? You spoke about migrating MySql database, but you didn't say anything about the rrd files. For example, all query results are stored on mysql?? or they are only stored on rrd files ?
If I copy those files cacti automatically will take those files and start to put data on them?
Once you copy these things to your new server and make sure all paths are configured properly, cacti should begin writing new data to the existing rrd files.
-Daniel
[url=http://dealnews.com/developers/cacti/memcached.html]memcached Template[/url] - Version 1.0
[url=http://dealnews.com/developers/]dealnews.com/developers[/url] - Useful scripts and Cacti templates.
[url=http://dealnews.com/]dealnews.com[/url] - How to go broke saving money.
[url=http://dealnews.com/developers/cacti/memcached.html]memcached Template[/url] - Version 1.0
[url=http://dealnews.com/developers/]dealnews.com/developers[/url] - Useful scripts and Cacti templates.
[url=http://dealnews.com/]dealnews.com[/url] - How to go broke saving money.
uugghhh
Well, I almost went "all the way" with my migration.
The thing is I actually can see all the devices, use the cacti web interface without any problems, and poll all the devices.
BUT, when I go to Graph Management the interface says there are 504 graphs (ok), and it's showing 1 to 30, but it doesn't show me any graph list. Instead of that it says No Graphs found.
I checked on the mysql database and the graph_local table shows the 504 entries. I gave 777 permissions to the entire cacti/ path, and still nothing.
Also, if I go and execute poller.php manually it's correctly updating the rra files, as cacti.log says.
I need a clue on what could went wrong .
Thanks in advance.
The thing is I actually can see all the devices, use the cacti web interface without any problems, and poll all the devices.
BUT, when I go to Graph Management the interface says there are 504 graphs (ok), and it's showing 1 to 30, but it doesn't show me any graph list. Instead of that it says No Graphs found.
I checked on the mysql database and the graph_local table shows the 504 entries. I gave 777 permissions to the entire cacti/ path, and still nothing.
Also, if I go and execute poller.php manually it's correctly updating the rra files, as cacti.log says.
I need a clue on what could went wrong .
Thanks in advance.
- Attachments
-
- Screenshot
- no_graphs.jpg (99.45 KiB) Viewed 4522 times
When I first entered the website it complained about my client, as my old MySql version was 3.23 and now I installed 5.0.22
It said:
"Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /home/cacti/cacti-0.8.6d/lib/adodb/drivers/adodb-mysql.inc.php on line 339
"
What I did was to search for this specific problem, it was the cacti MySql client that it was connecting using an old version password. So, searching I found that I had to let the user run with a pre 4.1 MySql version. To change this I did:
Well, that is.
It said:
"Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /home/cacti/cacti-0.8.6d/lib/adodb/drivers/adodb-mysql.inc.php on line 339
"
What I did was to search for this specific problem, it was the cacti MySql client that it was connecting using an old version password. So, searching I found that I had to let the user run with a pre 4.1 MySql version. To change this I did:
Code: Select all
Reset the password to pre-4.1 style for each user that needs to use a pre-4.1 client program. This can be done using the SET PASSWORD statement and the OLD_PASSWORD() function:
mysql> SET PASSWORD FOR
-> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
Re: uugghhh
leorocco wrote:Well, I almost went "all the way" with my migration.
The thing is I actually can see all the devices, use the cacti web interface without any problems, and poll all the devices.
BUT, when I go to Graph Management the interface says there are 504 graphs (ok), and it's showing 1 to 30, but it doesn't show me any graph list. Instead of that it says No Graphs found.
I checked on the mysql database and the graph_local table shows the 504 entries. I gave 777 permissions to the entire cacti/ path, and still nothing.
Also, if I go and execute poller.php manually it's correctly updating the rra files, as cacti.log says.
I need a clue on what could went wrong .
Thanks in advance.
I am in the same position... went from fc3 to openbsd and I get the same problem... any clues? was this ever solved?
Who is online
Users browsing this forum: No registered users and 2 guests