lundi 11 octobre 2010

Transférer cacti vers un autre serveur

- Old Server:

1. Stop Cacti from running by removing or moving the crontab job from /etc/cron.d. I just moved it to root's home area in case I need it again.

2. Backup the cacti database:
mysqldump -u root -p cacti > cacti_export.sql
(-u username -p prompt me for the password database_name > sql file)

3. Copy the cacti_export.sql file to the new server.

4. Copy the rra, scripts, and any other modified files to the corresponding directory on the new server.
scp -r /var/www/cacti/rra/* root@violet:/var/www/html/cacti/rra/


- New Server:

1. Create the cacti databases, import old database, and set appropriate permissions.

mysqladmin --user=root create cacti
mysql -u root -p cacti < /root/cacti_export.sql mysql -u root -p cacti mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'the password of cactiuser';
mysql> flush privileges;
mysql> quit;


2. Verify the permissions are set correctly on the rra/ and log/ directories in cacti's home area.
chown -R cactiuser:cactiuser rra/ log/
It never hurts to make sure, especially after you have copied files from another server.

3. I then go to the log/ directory and tail -f the cacti.log and watch for the next crontab job to run and hopefully see good results.

I think that is all I had to do, but this is the best I can remember. If you have SNMP access lists on your devices or any firewall rules in your path, always make sure to change them to reflect the new server.

EXTRAS:

I install the cacti plugin architecture, www.cactiusers.org, primarily the thold plugin. The steps are easy to follow, so I leave you to follow their documentation.


Source : http://cainsplace.blogspot.com/2007/05/moving-cacti-from-one-linux-server-to.html

Aucun commentaire:

Enregistrer un commentaire