Cách sao lưu

Sử dụng lệnh sau để thực hiện sao lưu:

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

Trong đó component_name là tên của thành phần. Các giá trị có thể bao gồm:

  • apigee-cassandra (Cassandra)
  • apigee-openldap (OpenLDAP)
  • apigee-postgresql (Cơ sở dữ liệu PostgreSQL)
  • apigee-qpidd (Qpidd)
  • apigee-sso (Edge SSO)
  • apigee-zookeeper (ZooKeeper)
  • edge-management-server (Máy chủ quản lý)
  • edge-management-ui (Giao diện người dùng Edge mới)
  • edge-message-processor (Bộ xử lý thông báo)
  • edge-postgres-server (Máy chủ Postgres)
  • edge-qpid-server (Máy chủ Qid)
  • edge-router (Bộ định tuyến Edge)
  • edge-ui (Giao diện người dùng cổ điển)

Ví dụ:

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

Để thực hiện sao lưu:

  1. Ngừng thành phần này (trừ PostgreSQL và Cassandra phải chạy để sao lưu):

    /opt/apigee/apigee-service/bin/apigee-service component_name stop
  2. Chạy lệnh sao lưu:

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

    Sau đó, lệnh sao lưu sẽ:

    • Tạo một tệp tar của các thư mục và tệp sau, trong đó component_name là tên của thành phần:
      1. Thư mục
        • /opt/apigee/data/component_name
        • /opt/apigee/etc/component_name.d
      2. Tệp nếu có
        • /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
    • Tạo một tệp .tar.gz trong thư mục /opt/apigee/backup/component_name. Tên tệp có dạng như sau:
      backup-year.month.day,hour.min.seconds.tar.gz

      Ví dụ:

      backup-2018.05.29,11.13.42.tar.gz

      Đối với PostgreSQL, tên tệp có dạng như sau:

      year.month.day,hour.min.seconds.dump
  3. Khởi động thành phần (trừ PostgreSQL và Cassandra phải chạy để sao lưu):

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

Nếu đã cài đặt nhiều thành phần Edge trên cùng một nút, bạn có thể sao lưu tất cả các thành phần đó bằng một lệnh:

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

Lệnh này tạo một tệp sao lưu cho mỗi thành phần trên nút.