はじめに
このドキュメントでは Cisco DNA Center 2.3.3 以降でサポートされた GUI 操作による外部 SFTP サーバへの管理機器の Configuration Archive 説明します。
GUI 設定による Configuration Archive の取得
System > Settings > Configuration Archive > External にて Add をクリックします。

SFTP サーバの情報やアーカイブのスケジュールを設定します。Backup Format はパスワードなどがマスクされた Sanitized と show running-config, show startup-config 実行時と同じ内容となる RAW を選択できます。RAW フォーマットを選択する場合は ZIP アーカイブ用のパスワードが必要になります。


SFTP サーバへの接続に成功すると設定が保存され、Connectivity が Connected ステータスになり、指定したスケジュールで管理機器の設定がアーカイブされます。
SFTP サーバでは設定したしたパスの下に device_config_export/xxxxxx/ というディレクトリが作成され、Export_Configs-xxxxxx.zip というファイル名でアーカイブが作成されます。
demo@tky-dna1-js:~$ ls -lR ./dnac/config-archive/
./dnac/config-archive/:
total 4
drwxrwxr-x 3 demo demo 4096 Oct 25 16:56 device_config_export
./dnac/config-archive/device_config_export:
total 4
drwxrwxr-x 2 demo demo 4096 Oct 25 17:24 04edad59-30b9-453d-b078-285cee5961e0
./dnac/config-archive/device_config_export/04edad59-30b9-453d-b078-285cee5961e0:
total 116
-rw-rw-r-- 1 demo demo 115956 Oct 25 16:56 Export_Configs-25_Oct_2022_07_56_00_166-of3.zip
demo@tky-dna1-js:~$
ZIP ファイルを PC にダウンロードして展開するなどして設定ファイルを確認します。アーカイブには running-config, startup-config および vlan.dat が含まれます。電子証明書や RSA 鍵などは含まれません。 RAW フォーマットで保存する場合、ZIP ファイルは AES 暗号化されています。Linux では unzip で展開できない場合がありますので 7zip などを使用してください (環境によっては sudo apt install p7zip-full などでインストールする必要があります)
demo@tky-dna1-js:~/dnac/config-archive/device_config_export/04edad59-30b9-453d-b078-285cee5961e0$ 7z x Export_Configs-25_Oct_2022_07_56_00_166-of3.zip
7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=C.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz (406F1),ASM,AES-NI)
Scanning the drive for archives:
1 file, 115956 bytes (114 KiB)
Extracting archive: Export_Configs-25_Oct_2022_07_56_00_166-of3.zip
--
Path = Export_Configs-25_Oct_2022_07_56_00_166-of3.zip
Type = zip
Physical Size = 115956
Enter password (will not be echoed):
Everything is Ok
Files: 14
Size: 560925
Compressed: 115956
demo@tky-dna1-js:~/dnac/config-archive/device_config_export/04edad59-30b9-453d-b078-285cee5961e0$ ls -l
total 136
drwx------ 2 demo demo 4096 Oct 25 17:32 192.168.102.14-tky-dna2-ewlc1.cisco.com
drwx------ 2 demo demo 4096 Oct 25 17:32 192.168.12.10-tky-dna2-edge1.cisco.com
drwx------ 2 demo demo 4096 Oct 25 17:32 192.168.12.11-tky-dna2-edge2.cisco.com
drwx------ 2 demo demo 4096 Oct 25 17:32 192.168.12.8-tky-dna2-border1.cisco.com
drwx------ 2 demo demo 4096 Oct 25 17:32 192.168.12.9-tky-dna2-border2.cisco.com
-rw-rw-r-- 1 demo demo 115956 Oct 25 16:56 Export_Configs-25_Oct_2022_07_56_00_166-of3.zip
demo@tky-dna1-js:~/dnac/config-archive/device_config_export/04edad59-30b9-453d-b078-285cee5961e0$
demo@tky-dna1-js:~/dnac/config-archive/device_config_export/04edad59-30b9-453d-b078-285cee5961e0$ ls -lR ./192.168.12.8-tky-dna2-border1.cisco.com
./192.168.12.8-tky-dna2-border1.cisco.com:
total 68
-rw-rw-r-- 1 demo demo 35385 Oct 25 07:56 25_Oct_2022_07_56_00_166_RUNNINGCONFIG.cfg
-rw-rw-r-- 1 demo demo 26076 Oct 25 07:56 25_Oct_2022_07_56_00_166_STARTUPCONFIG.cfg
-rw-rw-r-- 1 demo demo 736 Oct 25 07:56 25_Oct_2022_07_56_00_166_vlan.dat.bat
demo@tky-dna1-js:~/dnac/config-archive/device_config_export/04edad59-30b9-453d-b078-285cee5961e0$
demo@tky-dna1-js:~/dnac/config-archive/device_config_export/04edad59-30b9-453d-b078-285cee5961e0$ cd 192.168.12.8-tky-dna2-border1.cisco.com
demo@tky-dna1-js:~/dnac/config-archive/device_config_export/04edad59-30b9-453d-b078-285cee5961e0/192.168.12.8-tky-dna2-border1.cisco.com$
demo@tky-dna1-js:~/dnac/config-archive/device_config_export/04edad59-30b9-453d-b078-285cee5961e0/192.168.12.8-tky-dna2-border1.cisco.com$ cat 25_Oct_2022_07_56_00_166_STARTUPCONFIG.cfg | grep "enable secret"
enable secret 9 $9$ZfYRzjHj9M.Rzk$rne5JO0xGHC7RGQYZw9OCogyUeJyLeTaBZlMpe42m3M <<<<< RAW フォーマットの場合はマスクされない
demo@tky-dna1-js:~/dnac/config-archive/device_config_export/04edad59-30b9-453d-b078-285cee5961e0/192.168.12.8-tky-dna2-border1.cisco.com$