ネットワークエンジニアの備忘録

トラブルや気になった点をメモしておきます。

Cisco PIのバックアップとリストア

Cisco Prime Infrastructureのバックアップとリストアの手順を記載します。注意点としてPrime InfrastructureはOracleを搭載しているため、システムやサービスの再起動には時間を要します。バージョンアップ等の作業を実施する際は、作業時間を多めに見積もることをお勧めします。また、検証用にメモリが12G必要な最低構成をメモリが16Gほど空いている仮想サーバにデプロイしてみましたが、重くて使えませんでした。よほどリソースに余りがない限り、アプライアンス版の購入したほうが良いかなと思いました。

【バックアップファイルの作成】

バックアップファイルを作成する際は、FTPサーバを用意することでバックアップファイル作成時に自動的にFTPでアップロードされます。

CiscoPI/admin# conf t 
Enter configuration commands, one per line. End with CNTL/Z.
CiscoPI/admin(config)#
CiscoPI/admin(config)# repository backup-repo-180628
CiscoPI/admin(config-Repository)#
CiscoPI/admin(config-Repository)# url ftp://x.x.x.x
CiscoPI/admin(config-Repository)# user admin password pallain Cisco123
CiscoPI/admin(config-Repository)#
CiscoPI/admin(config-Repository)# end
CiscoPI/admin# show repository backup-repo-180628
backup_area.txt
CiscoPI/admin#
CiscoPI/admin# backup pibackup repository backup-repo-180628 application NCS

DO NOT press ^C while the backup is in progress

Aborting backup with ^C may terminate the backup operation or the backup file may be corrupted
Backup Started at : 06/26/18 15:49:28
Stage 1 of 7: Database backup ... Database size: 20G
-- completed at 06/26/18 15:50:36
Stage 2 of 7: Database copy ...
-- completed at 06/26/18 15:50:36
Stage 3 of 7: Backing up support files ...
-- completed at 06/26/18 15:50:36
Stage 4 of 7: Compressing Backup ...
-- completed at 06/26/18 15:50:38
Stage 5 of 7: Building backup file ...
-- completed at 06/26/18 15:51:19
Stage 6 of 7: Encrypting backup file ...
-- completed at 06/26/18 15:51:31
Stage 7 of 7: Transferring backup file ...
-- completed at 06/26/18 15:51:50
% Backup file created is: PI-Back-180626-1549__VER3.1.0.0.132_BKSZ9G_CPU16_MEM4G_RAM23G_SWAP15G_APP_CK613141954.tar.gpg
Total Backup duration is: 0h:2m:22s

 

【バックアップファイルからのリストア】

CiscoPI/admin# restore PI-Back-180626-1549__VER3.1.0.0.132_BKSZ9G_CPU16_MEM4G_RAM23 G_SWAP15G_APP_CK613141954.tar.gpg repository backup-repo-180626 application NCS 


* NOTE * If the system console is disconnected or got cleared on session timeout
run 'show restore log' to see the output of the last restore session.

Restore will restart the application services. Continue? (yes/no) [yes] ? yes

DO NOT press ^C while the restoration is in progress
Aborting restore with a ^C may leave the system in a unrecoverable state

Initiating restore.
Please wait... Restore Started at 06/26/18 15:58:33
Stage 1 of 9: Transferring backup file ... -- completed at 06/26/18 15:58:40
Stage 2 of 9: Decrypting backup file ... -- completed at 06/26/18 15:59:01
Stage 3 of 9: Unpacking backup file ... -- completed at 06/26/18 15:59:01
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Estimated time for completion of the remaining stages : 06/26/2018 16:41:30
Systems with faster disk throughput may finish earlier than the estimated time
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Stage 4 of 9: Decompressing backup ...
-- completed at 06/26/18 16:01:30
Stage 5 of 9: Restoring Support Files ...
-- completed at 06/26/18 16:01:31
Stage 6 of 9: Restoring Database Files ...
-- completed at 06/26/18 16:04:10
Stage 7 of 9: Recovering Database ...
-- completed at 06/26/18 16:05:58
Stage 8 of 9: Updating Database Schema ...
-- completed at 06/26/18 16:05:58
Stage 9 of 9: Re-enabling Database Settings ...
-- completed at 06/26/18 16:08:16
Total Restore duration is: 00h:09m:43s
INFO: Restore completed successfully.

Starting Prime Infrastructure...

This may take a while (10 minutes or more) ...

Prime Infrastructure started successfully.
Completed in 613 seconds

今回のテストではバックアップ~リストアまで約30分弱でした。あまりデータが入っていない状態で実施したため、データ量に応じて時間を追加計上しておいたほうが良いです。ちなみにライセンス追加では再起動は不要でした、ただし反映に再ログインが必要です。