はじめに
本ドキュメントでは、EPNMでApplicationバックアップで取得したバックアップデータを使用してリストアする方法について説明します。Applicationバックアップファイルの取得方法については以下の記事をご参照ください。
https://community.cisco.com/t5/-/-/ta-p/5247920
EPNM: Application Backupファイルの取得方法について
前提
本ドキュメントでは、リストア操作を進める上で以下を前提としています。
- EPNM上で取得したApplicationバックアップファイルは、EPNMとは異なるホストに保存されていることを前提としています。
- リストア先となるEPNMは、Applicationバックアップファイルを取得したEPNMサーバーと、CPUやメモリなど同等の構成であり、既に構築済みであること。
リストア方法
リストアは次の順序で進めます。
- Applicationバックアップファイルのコピー
- データベースのリセット
- Applicationバックアップのリストア
1. Applicationバックアップファイルのコピー
リストア先となるEPNMにログインして、CLIでshellに入り、リモートサーバー上のApplicationバックアップファイルをレポジトリにコピーします。
以下は、リモートホスト192.168.90.30上のApplicationバックアップファイル'epnm-241201-0426__VER8.0_BKSZ15G_CPU16_MEM16G_RAM62G_SWAP15G_APP_CK2847857467.tar.gpg'ファイルをEPNMサーバーのデフォルトレポジトリに保存した際の例です。
[実行例]
EPNM/admin# shell
Enter shell access password :
Starting bash shell ...
ade # cd /localdisk/defaultRepo
ade # scp root@192.168.90.30:/root/epnm-241201-0426__VER8.0_BKSZ15G_CPU16_MEM16G_RAM62G_SWAP15G_APP_CK2847857467.tar.gpg .
The authenticity of host '192.168.90.30 (192.168.90.30)' can't be established.
ECDSA key fingerprint is SHA256:h1u5HMxP6fnqS5AHvQQny4l71MisW7fIZKy4CLg9UmQ.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.90.30' (ECDSA) to the list of known hosts.
root@192.168.90.30's password:
epnm-241201-0426__VER8.0_BKSZ15G_CPU16_MEM16G_RAM62G_SWAP15G_APP_CK2847857467.tar.gpg 100% 2794MB 107.2MB/s 00:26
ade #
2. データベースのリセット
以下のコマンドで現在のEPNMのデータベースをリセットします。
# ncs run reset db
[実行例]
EPNM/admin# ncs run reset db
********************* Warning *********************
This script will delete the existing data in database (network data) and reset database to default factory settings.
Do you want to proceed [yes/no] [no]? yes
Stopping Evolved Programmable Network Manager...
This may take a few minutes...
Database is not running.
FTP Service is not running.
TFTP Service is not running.
NMS Server is not running!.
Evolved Programmable Network Manager successfully shutdown.
Stopping SAM daemon...
Checking for SAM daemon again ...
SAM Daemon not found...
Stopping DA daemon ...
Checking for DA daemon again ...
DA Daemon not found...
Completed shutdown of all services
Listener wcstns is down.
Listener already stopped.
Database is already stopped. Cannot stop again.
This script is intended to run database configuration utilities
to provision and create the embedded database
Running database network config assistant tool (netca)...
Running silent oracle DB creation script...
Database creation script completed...
configuring database ...
configuring Oracle memory size
Running standby database creation script...
currentState is ...
sid being set wcs
SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 1 05:42:28 2023
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
SQL> ORACLE instance started.
Total System Global Area 2147483648 bytes
Fixed Size 2926472 bytes
Variable Size 956303480 bytes
Database Buffers 1174405120 bytes
Redo Buffers 13848576 bytes
Database mounted.
Database opened.
SQL>
User altered.
SQL> Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL*Plus: Release 12.1.0.2.0 Production on Fri Dec 1 05:42:59 2023
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to an idle instance.
SQL> ORACLE instance started.
Total System Global Area 1287651328 bytes
Fixed Size 2934984 bytes
Variable Size 331351864 bytes
Database Buffers 947912704 bytes
Redo Buffers 5451776 bytes
Database mounted.
Database opened.
SQL>
User altered.
SQL> Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Listener wcstns is up
Database is already stopped. Cannot stop again.
INFO: reset db command executed successfully. Please restore the system data from a backup file
EPNM/admin#
3. Applicationバックアップのリストア
データベースのリセットが完了したら、レポジトリに保存したApplicationバックアップファイルを指定してリストアします。
# restore <Applicationバックアップファイル> repository <レポジトリ名> application NCS
restoreコマンドを実行すると、リスタートもしくはリブート実行の確認、ADE-OSの現在の構成の保存の可否が確認され、その後にパスワードの入力が求められます。このパスワードは、Applicationバックアップファイル作成時に設定したものを入力します。なお、処理中のネットワーク切断等によるトラブルを回避するため、restoreコマンドはSSH等ではなく、コンソールをご使用ください。
[実行例]
EPNM/admin# show repository defaultRepo
epnm-241201-0426__VER8.0_BKSZ15G_CPU16_MEM16G_RAM62G_SWAP15G_APP_CK2847857467.tar.gpg
EPNM/admin#
EPNM/admin# restore epnm-241201-0426__VER8.0_BKSZ15G_CPU16_MEM16G_RAM62G_SWAP15G_APP_CK2847857467.tar.gpg repository defaultRepo application NCS
リストア処理は9つのステージに分かれています。全てのステージで処理が終わるとリストアの完了となり、コンソールのプロンプトが表示されます。なお、必要に応じて再起動が実行される場合もあります。