Lost hosts after migrating.

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

Moderators: Developers, Moderators

Post Reply
linuxman1
Posts: 8
Joined: Mon Jun 14, 2010 5:39 am

Lost hosts after migrating.

Post by linuxman1 »

I migrated a Cacti installation to another server and it went fine except there are some hosts after some days we discovered it were not there on the new system, What I missed when I migrated the Cacti, Mysql tables or some old Cacti files or what cause the loss of some hosts were there on the cacti web interface?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The required procedure is to
- copy the code
- mysqldump and restore cacti db
- rrdtool dump and restore the rrd files
That's it. If you did that, please verify, that the "missing" hosts were available before. For polling errors, please see 2nd link of my sig
R.
linuxman1
Posts: 8
Joined: Mon Jun 14, 2010 5:39 am

Lost hosts after migrating.

Post by linuxman1 »

Thanks for helping, When I migrated Cacti from a Debian system to another I migrated the Mysql data bases and it's web directory which is /usr/share/cacti/site and the rrd files which reside in /var/lib/cacti/rra/
So do you see I missed something, By the way I found the old graphs rrd files for the hosts we missed in /var/lib/cacti/rra/ but we lost the hosts them selves on the web interface, I still have backups from the old system and wish to restore the lost hosts, What should I do and I want to be careful so I don't miss any new added or modified hosts we may added.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Lost hosts after migrating.

Post by gandalf »

linuxman1 wrote:When I migrated Cacti from a Debian system to another I migrated the Mysql data bases
How did you do? mysqldump and restore?
R.
linuxman1
Posts: 8
Joined: Mon Jun 14, 2010 5:39 am

Lost hosts after migrating.

Post by linuxman1 »

Although I know it wasn't the best method to do so, I stopped the Mysql service and copied the data a cross the network using scp, and then started the Mysql service on the new system, I just missed some hosts and most of hosts were there OK. I still have other backups and the whole old hard disk containing the old setup, Do you see to restore the data bases again from the old system using a better way?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Yep. It's not better, it's REQUIRED.
Please dump the database using mysqldump. Then restore again. See e.g. http://docs.cacti.net/manual:087:4_help ... _logrotate
R.
linuxman1
Posts: 8
Joined: Mon Jun 14, 2010 5:39 am

Lost hosts after migrating.

Post by linuxman1 »

Thanks for the help,
I have a problem, I don't want to restore the data bases from the old as I will lost any new changes since the last backup, So I want to restore only the difference between them, Can you help.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

In case you do not have access to the "old" mysql tables, I can't help
R.
linuxman1
Posts: 8
Joined: Mon Jun 14, 2010 5:39 am

Lost hosts after migrating.

Post by linuxman1 »

I have access to it, Help me on how to restore it without losing any new changes may happened to the new data bases.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Are they still available to mysql (e.g. "show databases;" shows them) or only as files?
R.
linuxman1
Posts: 8
Joined: Mon Jun 14, 2010 5:39 am

Lost hosts after migrating.

Post by linuxman1 »

Yes I have it, It's intact. How I may restore it without overwriting any new records.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests