您可以在備份該元件時,從您建立的檔案還原元件。如要這麼做,請使用 restore
指令。
請注意,restore
指令:
- 如未指定檔案名稱,則會使用指定的備份檔案或取得最新的備份檔案。
- 確保元件的資料目錄為空白。
- 停止元件。還原後必須明確重新啟動元件。
本節說明如何使用 restore
指令。
如何從備份檔案還原元件:
- 使用下列指令還原先前的設定和資料:
/opt/apigee/apigee-service/bin/apigee-service component_name restore backup_file
在此情況下:
- component_name 是元件的名稱。可能的值包括:
apigee-cassandra
(Cassandra)apigee-openldap
(OpenLDAP)apigee-postgresql
(PostgreSQL 資料庫)apigee-qpidd
(魁北克)apigee-sso
(邊緣單一登入)apigee-zookeeper
(ZooKeeper)edge-management-server
(管理伺服器)edge-management-ui
(新版 Edge UI)edge-message-processor
(訊息處理器)edge-postgres-server
(Postgres 伺服器)edge-qpid-server
(快速伺服器)edge-router
(邊緣路由器)edge-ui
(傳統版 UI)
backup_file 是您在備份該元件時所建立的檔案名稱。
例如:
/opt/apigee/apigee-service/bin/apigee-service apigee-cassandra restore backup-2019.03.17,14.40.41.tar.gz
您可以選擇是否指定 backup_file。如果省略的話,Apigee 會使用
/opt/apigee/backup/component_name
中的最新檔案。restore
指令會重新套用備份的設定,並還原備份開始之後的資料。 - component_name 是元件的名稱。可能的值包括:
- 重新啟動元件,如以下範例所示:
/opt/apigee/apigee-service/bin/apigee-service component_name start