Migration requisites

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
leorocco
Posts: 22
Joined: Wed Feb 08, 2006 8:55 am

Migration requisites

Post by leorocco »

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.
danbeck
Posts: 30
Joined: Tue Jun 20, 2006 12:08 pm
Location: Huntsville, Alabama
Contact:

Migrating cacti to a new server/location.

Post by danbeck »

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:

Code: Select all

mysqldump -h locahost -u cactiuser -pcactipass --add-drop-table cactidb > cactidb.sql
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.
-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.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

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.
[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]
leorocco
Posts: 22
Joined: Wed Feb 08, 2006 8:55 am

Post by leorocco »

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.
danbeck
Posts: 30
Joined: Tue Jun 20, 2006 12:08 pm
Location: Huntsville, Alabama
Contact:

Post by danbeck »

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?
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.

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.
leorocco
Posts: 22
Joined: Wed Feb 08, 2006 8:55 am

uugghhh

Post by leorocco »

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.
Attachments
Screenshot
Screenshot
no_graphs.jpg (99.45 KiB) Viewed 4509 times
leorocco
Posts: 22
Joined: Wed Feb 08, 2006 8:55 am

Post by leorocco »

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:

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');
Well, that is.
User avatar
danno
Posts: 34
Joined: Wed Feb 16, 2005 2:35 pm
Location: Boca Raton, FL
Contact:

Re: uugghhh

Post by danno »

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?
leorocco
Posts: 22
Joined: Wed Feb 08, 2006 8:55 am

Post by leorocco »

yes. As I changed my MySql server version from 3.23 to 5.22 the old cacti version wasn't working.

The only thing I did was to upgrade Cacti version to the last one available.

Let me know how it goes.
User avatar
danno
Posts: 34
Joined: Wed Feb 16, 2005 2:35 pm
Location: Boca Raton, FL
Contact:

Post by danno »

yeah on mine the fc3 is running an older mysql than the openbsd mysql... so you're saying that you moved everything over, couldn't see anything, but when you updated cacti itself it all became visible again?
leorocco
Posts: 22
Joined: Wed Feb 08, 2006 8:55 am

Post by leorocco »

yes :D
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest