Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Mar 25, 2019 12:41 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Cacti server migration
PostPosted: Thu Feb 21, 2019 8:51 am 
Offline

Joined: Thu Nov 24, 2011 2:50 am
Posts: 31
Location: Germany
Hello,

I'm currently running Cacti v1.1.28 on SLES 11 on server A.
The server needs to be migrated.
I've already installed Cacti v1.1.38 on RHEL 7 from the EPEL repository on server B.

Is it nessesary or recommended to upgrade Cacti to the same destination version first before proceed with the migration?
I understood that it is not possible to simply copy the RRD files, but they have to be dumped and restored with rrdtool.

Thanks a lot in advance for any advice!


Top
 Profile  
 
 Post subject: Re: Cacti server migration
PostPosted: Thu Feb 21, 2019 11:50 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2296
You will need to migrate your database but having the exact same version isn't an issue as it will ask you to upgrade the DB.

You are also correct that if you are switching between 32-bit and 64-bit then the data must be exported and imported from the RRD files. There are tutorials on how to do this.

In the database, there are various settings which relate to paths, they should probably be checked to make sure that they are valid on the new system.

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Cacti server migration
PostPosted: Thu Feb 21, 2019 12:14 pm 
Offline

Joined: Thu Nov 24, 2011 2:50 am
Posts: 31
Location: Germany
Hello netniV,

Did I understand you correctly, if the architecture does not change (both 64-bit), then it is not necessary to export and import the RRD files? I can simply copy them?

The installation paths actually differ considerably. In which tables do path specifications exist that I have to check/change?

The database migration I'll properly simply do with mysqldump. Can I keep the cacti database on the new server or is it better to drop it first?


Top
 Profile  
 
 Post subject: Re: Cacti server migration
PostPosted: Thu Feb 21, 2019 7:59 pm 
Offline
Cacti User

Joined: Wed Mar 01, 2017 2:34 pm
Posts: 63
Regarding export and import of *.rrd files... you can use these two totally simple shell scripts for this.

Export:
Code:
#!/bin/sh

# export all *.rrd files to xml

for i in `find -name "*.rrd"`; do rrdtool dump $i > $i.xml; done



Import:

Code:
#!/bin/sh

# import all *.rrd.xml to *.rrd files to current architecture

for i in `find -name "*.rrd.xml"`; do
  rrd=${i%%.xml}
  mv -f $rrd $rrd.orig
  rrdtool restore $i $rrd
done


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group