Original cacti host ip:222.65.193.176 standby cacti host ip:222.65.194.8
1. Backup the MySQL and RRD data on the original cacti monitor host
Backup database: Mysqldump-p cacti >cacti.sql
Cacti, prompt input cacti login password, enter, backup good data under/root
2, Backup Rra file, Degree Niang said backup Rra file needs to be backed up with RRDtool dump command, I am here to use tar packaging.
#tar-CVF Rra.tar/var/www/html/rra Backup good data under/root
3. Copy the Cacti.sql and Rra.tar files to the new cacti server.
#scp Cacti.sql 222.65.193.8:/root
#scp Rra.tar 222.65.193.8:/var/www/html
4. Enter the standby cacti
5. Restore the RRD file
#tar xvf Rra.tar extracted files in/root (this is my current working directory)
#mv-F Var/www/html/rra/root/var/www/html/rra
6. Recover database data: First delete the cacti database in MySQL
#mysql-P Enter the default MySQL password
Mysql>drop database cacti Delete cacti databases
Mysql>create database cacti Create a new cacti
Mysql>ctrl+c
#mysql-P cacti <cacti.sql prompt input cacti login password, enter, restore database
7. Restart the mysqld and httpd services and force image generation
# Service Mysqld Restart
# Service httpd Restart
#/usr/bin/php/var/www/html/poller.php--force
8, open the website sometimes prompts the database error, click: Check can open cacti. Note that the password to login here is the original cacti password.
PS above method cannot restore the weather map, wait for Swaiiow to study again.
Cacti Backup and Migration