简介
本文档介绍通过使用配置数据库备份恢复vManage所涉及的步骤。
背景信息
本文档假定已定期进行配置db备份,并且由于某些原因,独立vManage不可恢复,需要重置软件或进行新安装。
本文档可帮助您恢复所有策略、模板、配置和边缘设备证书。
Backup Configuration-db
vManage_rcdn01# request nms configuration-db backup path 05_08_20_configdb
Starting backup of configuration-db
config-db backup logs are available in /var/log/nm/neo4j-backup.log file
Successfully saved database to /opt/data/backup/05_08_20_configdb.tar.gz
scp到外部服务器。
vManage_rcdn01# vshell
vManage_rcdn01:~$ scp /opt/data/backup/05_08_20_configdb.tar.gz user@10.2.3.1://home/ftpuser/ftp/amaugust/
amaugust@10.2.3.1's password:
05_08_20_configdb.tar.gz 100% 484KB 76.6MB/s 00:00
恢复vManage
通过命令重置vManage模拟灾难:
vManage_rcdn01# request software reset
现在,您有一个新的vManage,与图中所示的类似,建议在恢复备份之前,按照正确的顺序执行恢复过程。
步骤1:vManage上的最低配置
system
host-name vManage_rcdn01
system-ip xx.xx.xx.xx
site-id 100
organization-name ****.cisco
vbond vbond.list
!
!
vpn 0
host vbond.list ip 10.2.3.4 10.2.3.5
interface eth0
ip address 10.1.3.8/24
tunnel-interface
no shutdown
!
ip route 0.0.0.0/0 10.1.3.1
!
vpn 512
interface eth1
ip address 10.11.3.8/24
no shutdown
!
ip route 0.0.0.0/0 10.1.3.1
!
第二步:复制备份配置和根证书
vManage_rcdn01:~$ scp am****@xx.xx.xx.xx://home/ftpuser/ftp/am****/05_08_20_configdb.tar.gz .
am****@xx.xx.xx.xx's password:
05_08_20_configdb.tar.gz 100% 484KB 76.6MB/s 00:00
Verify
vManage_rcdn01:~$ ls -lh
total 492K
-rw-r--r-- 1 admin admin 394 May 8 15:20 archive_id_rsa.pub
-rwxr-xr-x 1 admin admin 485K May 8 15:3905_08_20_configdb.tar.gz
Copy root certificate from other controller:
vManage_rcdn01:~$ scp admin@vbond://home/admin/root.crt .
viptela 18.4.4
admin@vbond's password:
root.crt 100% 1380 2.8MB/s 00:00
第三步:安装根证书
vManage_rcdn01# request root-cert-chain install /home/admin/root.crt
Uploading root-ca-cert-chain via VPN 0
Copying ... /home/admin/root.crt via VPN 0
Updating the root certificate chain..
Successfully installed the root certificate chain
第四步:更新基本信息
导航至 Administration > Settings
并配置vBond IP、组织名称和证书的基本信息。
第五步:安装vManage证书
请使用 root.crt
安装在Step 2中。
第六步:恢复数据库
vManage_rcdn01# request nms configuration-db restore path /home/admin/05_08_20_configdb.tar.gz
Configuration database is running in a standalone mode
0 [main] INFO com.viptela.vmanage.server.deployment.cluster.ClusterConfigurationFileHandler - Trying to update existing working copy of server_configs.json file
4 [main] INFO com.viptela.vmanage.server.deployment.cluster.ClusterConfigurationFileHandler - Working copy of server_configs.json NOT updated due to unmodified configs
Successfully saved cluster configuration for localhost
Starting DB backup from: localhost
Creating directory: local
cmd to backup db: sh /usr/bin/vconfd_script_nms_neo4jwrapper.sh backup localhost /opt/data/backup/local 8g
Finished DB backup from: localhost
Stopping NMS application server on localhost
Stopping NMS configuration database on localhost
Reseting NMS configuration database on localhost
Restoring from DB backup: /opt/data/backup/staging/graph.db-backup
cmd to restore db: sh /usr/bin/vconfd_script_nms_neo4jwrapper.sh restore /opt/data/backup/staging/graph.db-backup
Successfully restored DB backup: /opt/data/backup/staging/graph.db-backup
Starting NMS configuration database on localhost
Waiting for 10s before starting other instances...
Polling neo4j at: localhost
NMS configuration database on localhost has started.
Updating DB with the saved cluster configuration data
Successfully reinserted cluster meta information
Starting NMS application-server on localhost
Waiting for 120s for the instance to start...
Removed old database directory: /opt/data/backup/local/graph.db-backup
Successfully restored database
此步骤需要较长时间,具体取决于备份。
您可以通过以下方式验证该流程: tailing
vShell上的日志。
vManage_rcdn01:~$ tail -fq /var/log/nms/vmanage-server.log /var/log/nms/neo4j-out.log
步骤 7.检查服务
vManage_rcdn01# request nms all status
步骤 8重新验证控制器
目前,您可以观察到所有策略、模板和配置都已加载到vManage中,但所有控制器均已关闭。
您需要对所有控制器重新进行身份验证。
导航至 Configuration > Devices
.编辑每个控制器并填写管理IP地址(管理IP可以在本地配置中找到)用户名和密码。
步骤 9将更新发送到控制器
现在,您会看到所有设备都可以通过vManage进行管理。