private boolean backupBrokerConfig(StringBuilder strBuff) {
        logger.info("[Backup Broker Conf] begin ");
        Map<String, BrokerConfEntity> brokerConfMap = getBrokerConfInfos(strBuff);
        if (brokerConfMap == null) {
            logger.error("  download broker configurations is null!");
            return false;
        }
        logger.info("[Backup Broker Conf] store broker configurations to local file");
        storeObjectToFile(brokerConfMap, backupAndRecoveryPath, storeFileNameBrokerConf);
        logger.info("[Backup Broker Conf] verify configurations");
        Map<String, BrokerConfEntity> storedBrokerConfigMap =
                (Map<String, BrokerConfEntity>) readObjectFromFile(
                        backupAndRecoveryPath, storeFileNameBrokerConf);
        if (storedBrokerConfigMap == null) {
            logger.error(strBuff.append("  read configure file ")
                    .append(backupAndRecoveryPath).append("/")
                    .append(storeFileNameBrokerConf).append(" failure!").toString());
            strBuff.delete(0, strBuff.length());
            return false;
        }
        if (storedBrokerConfigMap.size() != brokerConfMap.size()) {
            logger.error("  verify failure, stored brokerConfig size not equal!");
            return false;
        }
        for (Map.Entry<String, BrokerConfEntity> qryEntry : brokerConfMap.entrySet()) {
            BrokerConfEntity targetEntity = storedBrokerConfigMap.get(qryEntry.getKey());
            if (targetEntity == null || !targetEntity.isDataEquals(qryEntry.getValue())) {
                logger.error(strBuff
                        .append("  verify failure, stored brokerConfig value not equal!")
                        .append(" data in server is ").append(qryEntry.getValue().toString())
                        .append(", data stored is ").append((targetEntity == null)
                                ? null
                                : targetEntity.toString())
                        .toString());
                strBuff.delete(0, strBuff.length());
                return false;
            }
        }
        logger.info("[Backup Broker Conf] end, success!");
        return true;
    }
Backup broker configurations

@param strBuff  the string buffer
@return         true for success, false for failure
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/tools/cli/CliMetaDataBRU.java