如何备份

Edge for Private Cloud v4.19.01

使用以下命令执行备份:

/opt/apigee/apigee-service/bin/apigee-service component_name backup

其中 component_name 是组件的名称。可能的值包括:

  • apigee-cassandra(卡桑德拉)
  • apigee-openldap(打开 LDAP)
  • apigee-postgresql(PostgreSQL 数据库)
  • apigee-qpidd(Qpidd)
  • apigee-sso(边缘单点登录)
  • apigee-zookeeper (ZooKeeper)
  • edge-management-server(管理服务器)
  • edge-management-ui(新版 Edge 界面)
  • edge-message-processor(消息处理器)
  • edge-postgres-server(Postgres 服务器)
  • edge-qpid-server (Qpid Server)
  • edge-router(边缘路由器)
  • edge-ui(传统版界面)

例如:

/opt/apigee/apigee-service/bin/apigee-service apigee-cassandra backup

如需进行备份,请执行以下操作:

  1. 停止组件(PostgreSQL 和 Cassandra 除外,它们必须运行以进行备份):

    /opt/apigee/apigee-service/bin/apigee-service component_name stop
  2. 运行备份命令:

    /opt/apigee/apigee-service/bin/apigee-service component_name backup

    然后备份命令将:

    • 创建以下目录和文件的 tar 文件,其中 component_name 是组件的名称:
      1. 目录
        • /opt/apigee/data/component_name
        • /opt/apigee/etc/component_name.d
      2. 如果存在的文件
        • /opt/apigee/token/application/component_name.properties
        • /opt/apigee/customer/application/component_name.properties
        • /opt/apigee/customer/defaults.sh
        • /opt/apigee/customer/conf/license.txt
    • /opt/apigee/backup/component_name 目录中创建一个 .tar.gz 文件。文件名采用以下格式:
      backup-year.month.day,hour.min.seconds.tar.gz

      例如:

      backup-2018.05.29,11.13.42.tar.gz

      对于 PostgreSQL,文件名采用以下格式:

      year.month.day,hour.min.seconds.dump
  3. 启动组件(PostgreSQL 和 Cassandra 必须运行才能进行备份):

    /opt/apigee/apigee-service/bin/apigee-service component_name start

如果您在同一节点上安装了多个 Edge 组件,则只需一个命令即可备份所有组件:

/opt/apigee/apigee-service/bin/apigee-all backup

此命令会为节点上的每个组件创建一个备份文件。