跳到主要内容

备份和恢复HA软件事件代理配置

本节提供了如何备份和恢复运行保证消息传递的高可用性(HA)Solace PubSub+ 软件事件代理的配置的说明。

不要在 PubSub+ Cloud 中的事件代理服务中使用此程序。在 PubSub+ Cloud 中使用此程序可能导致服务性能下降。相反,请参阅备份事件代理服务以获取更多信息。

一些配置信息未被备份,包括:

  • 产品密钥
  • TLS/SSL 服务器证书文件
  • TLS/SSL 服务器证书配置
  • 以下客户端证书:
    • 消息 VPN 桥接
    • 复制桥接
    • REST 交付点
    • 动态消息路由 (DMR)
    • 多节点路由 (MNR)
  • Kerberos Keytabs
  • 受信任的根配置(对于软件版本 8.2.0 之前的设备和版本 8.7.0 之前的软件事件代理)
  • 软件代理存储组
  • 软件代理扩展参数
  • 在代理中运行的监控代理(Datadog、SolGeneos)

此外,消息数据未被备份,包括:

  • 保证消息 spool
  • 队列消息
  • 回放日志消息

开始之前

在以下示例中,软件事件代理的命名约定如下:

  • 主事件代理:solace-primary
  • 备份事件代理:solace-backup
  • 监控事件代理:solace-monitor

备份配置

要备份 HA 配置中每个事件代理的配置,请运行以下命令。

在主设备上:

solace-primary# copy current-config /configs/cfg_primary_AD_active

在备份设备上:

solace-backup# copy current-config /configs/cfg_backup_AD_inactive

在监控节点上:

solace-monitor# copy current-config /configs/cfg_monitor

上述命令将把配置备份文件保存到每个事件代理的 /usr/sw/jail/configs/ 目录中。例如,要查看在主事件代理上创建的备份文件,请运行 dir configs 命令:

solace-primary# dir configs
-rw-rw---- admin solgroup 9523 Jan 21 09:41 cfg_primary_AD_active

回滚到之前的配置

要回滚到 HA 软件事件代理使用的之前的保证消息传递配置,请使用以下程序。

此程序将导致 HA 软件事件代理上的所有 spool 消息丢失。

这不是一项在服务中恢复的操作,因此在此过程的大部分时间内没有消息服务可用。

  1. 恢复监控节点的配置:
solace-monitor# reload config cfg_monitor
  1. 重置并回滚主事件代理到之前的配置:
solace-primary# configure
solace-primary(configure)# redundancy
solace-primary(configure/redundancy)# shutdown
solace-primary(configure/redundancy)# exit
solace-primary(configure)# hardware message-spool
solace-primary(configure/hardware/message-spool)# shutdown
solace-primary(configure/hardware/message-spool)# end
solace-primary# admin
solace-primary(admin)# system message-spool
solace-primary(admin/system/message-spool)# reset
solace-primary(admin/system/message-spool)# end
solace-primary# reload config cfg_primary_AD_active
solace-primary# configure
solace-primary(configure)# hardware message-spool
solace-primary(configure/hardware/message-spool)# shutdown
solace-primary(configure/hardware/message-spool)# end
  1. 在备份事件代理上关闭冗余和消息 spool:
solace-backup# configure
solace-backup(configure)# redundancy
solace-backup(configure/redundancy)# shutdown
solace-backup(configure/redundancy)# exit
solace-backup(configure)# hardware message-spool
solace-backup(configure/hardware/message-spool)# shutdown
solace-backup(configure/hardware/message-spool)# end
solace-backup# admin
solace-backup(admin)# system message-spool
solace-backup(admin/system/message-spool)# reset
solace-backup(admin/system/message-spool)# end
  1. 在主事件代理上重新启用消息 spool 和冗余:
solace-primary# configure
solace-primary(configure)# hardware message-spool
solace-primary(configure/hardware/message-spool)# no shutdown
solace-primary(configure/hardware/message-spool)# exit
solace-primary(configure/hardware)# exit
solace-primary(configure)# redundancy
solace-primary(configure/redundancy)# no shutdown
  1. 恢复备份事件代理的配置:
solace-backup# reload config cfg_backup_AD_inactive
  1. 可选:如果备份事件代理启动为活动状态,您可能希望通过在备份事件代理上执行 revert-activity 来将活动恢复到主设备:

    solace-backup# admin
    solace-backup(admin)# redundancy revert-activity
    solace-backup(admin)# end
  2. 如果 config-sync 不同步,请按照断言事件代理系统配置中描述的执行 assert-leader router 命令,以及按照断言事件代理 VPN 配置中描述的执行 assert-leader message-vpn 命令.