In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The company has 1 cacti monitor, but in order to prevent single cacti failure, prepare to add another cacti as backup monitor.
The monitor currently in use is 115.231.xx.xx and I call it cacti-A hereafter.
The newly installed monitor is 59.63.xx.xx below my tqp is cacti-B
1. Backup mysql database of cacti-A
cacti-A above operation
#cd /var/www/
#mysqldump cacti >cacti.sql Name the cacti export of cacti-A data cacti cacti.sql
If mysql has set a password, it is as follows
#mysqldump cacti -uroot -ppasswd >cacti.sql
Tip: Tables in individual databases may be corrupted resulting in backup failures.
For example: "ERROR 145 (HY000): Table'./ cacti/syslog_statistics' is marked as crashed and should be repaired"
Fix: # mysql -uroot -p Enter mysql
mysql> use cacti Enter database cacti
mysql> check tables syslog_statistics; check tables
mysql> repair table syslog_statistics; repair data tables
2. Restore the database files backed up by cacti-A to the database of cacti-B.
cacti-B above operation
# mysql -uroot -p
mysql> drop database cacti; Delete database cacti created during system installation
mysql> create database cacti; recreate a new database cacti
mysql> exit
#cd /var/www
# scp root@115.231.xx.xx:/var/www/cacti.sql ./ Copy cacti-A's backup database files to cacti-B
root@115.231.xx.xx's password: Enter the root password for cacti-A here
# mysql cacti use cacti;
mysql> show tables;
If it appears as follows... message indicates successful import
+---------------------------------------+
| Tables_in_cacti |
+---------------------------------------+
| cdef |
| cdef_items |
| colors |
| data_input |
| data_input_data |
。。。。。。。。。。
3. Backup cacti-A's cacti-related configuration file
Working on cacti-A
#cd /var/www
# tar -Pcpzf/var/www/cacti-backup. tar. gz/var/www/html/* Package all files and folders under/var/www/html directory
4. Restore cacti-A backup cacti profile to cacti-B
cacti-B operation
# scp root@115.231.xx.xx:/var/www/cacti-backup.tar.gz ./
root@115.231.xx.xx's password: Enter the root password for cacti-A here
# tar zxvf cacti-backup.tar.gz decompresses the packet and automatically overwrites the original cacti-B configuration file
Note: the above operations must distinguish between primary and secondary, any impact due to operational errors has nothing to do with this description.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Table A.5 computer configuration parameters
© 2024 shulou.com SLNews company. All rights reserved.