In Duke Nukem voice, "ain't got time to talk to myself". But here I am replying to my own thread.
I thought I would share some custom Device Family Definition Files. These will allow you to backup (Archive) your configuration files for some Cisco ASA devices such as the ASA 5505 and the ASA 5520. These are just slight variations on the existing Cisco Systems scripts that ship with NetSight. I came up with these after a few hours of debugging with the Archive Manager and the server.log on my NetSight server.
NOTES:
- I have NOT tested the restore functionality, because I have not needed it yet. Use that at your own risk.
- I am enabling "same-security-traffic permit inter-interface" on the 5505 script to allow it to TFTP across a VPN tunnel. This is seen as a security weakness. So you may want to throw in a couple more lines to remove this before you 'exit'.
- You may not need a full 60 seconds ("@receive 60") for this script to run. I have some slow devices at the end of slow links, hence I added a lot of time here. You could probably drop that to 30 and be okay.
- As with anything Cisco ... your mileage may vary thanks to minor changes in the command behavior between firmware releases.
Put these files in your NetSite 'devicefiles' directory. In my case, that was /usr/local/Extreme_Networks/NetSight/appdata/InventoryMgr/properties/devicefiles. Your path can be found in Inventory Manager (Tools > Options > Inventory Manager > Data Storage Directory Path).
Then you will need to select them for your device. To do that, open NetSight Inventory Manager. Select your device in the left pane. In the right pane choose the Image Information tab. Change the Firmware and Configuration MIB's to "Script" and then choose the appropriate script from the Device Family Definition File Name. Remember to click Save in the upper right corner.
CiscoASA5505.txt
-- Use these scripts to manage Cisco devices name="Cisco Systems ASA 5505 - TFTP" desc="Cisco Systems ASA SSH/TFTP Scripts" -- -----BEGIN SCRIPT "Configuration Upload"----- enable %ENABLEPSWD% conf t same-security-traffic permit inter-interface tftp-server inside %TFTP_IP% %RELATIVE_TARGET_FILE_PATH% end wr net
@receive 60 exit -----END SCRIPT----- -----BEGIN SUCCESS "Configuration Upload"----- [ok] -----END SUCCESS----- -----BEGIN SCRIPT "Configuration Download"----- enable %ENABLEPSWD% conf t same-security-traffic permit inter-interface tftp-server inside %TFTP_IP% %RELATIVE_TARGET_FILE_PATH% copy %TFTP_URL% system:running-config running-config
@receive 120 exit -----END SCRIPT----- -----BEGIN SUCCESS "Configuration Download"----- [ok] -----END SUCCESS-----
Cisco ASA5520.txt
-- Use these scripts to manage Cisco devices name="Cisco Systems ASA 5520 - TFTP" desc="Cisco Systems ASA SSH/TFTP Scripts" -- -----BEGIN SCRIPT "Configuration Upload"----- enable %ENABLEPSWD% copy running-config tftp: running-config %TFTP_IP% %RELATIVE_TARGET_FILE_PATH%
@receive 30 exit -----END SCRIPT----- -----BEGIN SUCCESS "Configuration Upload"----- bytes copied -----END SUCCESS----- -----BEGIN SCRIPT "Configuration Download"----- enable %ENABLEPSWD% copy tftp: running-config %TFTP_IP% %RELATIVE_TARGET_FILE_PATH% running-config
@receive 60 exit -----END SCRIPT----- -----BEGIN SUCCESS "Configuration Download"----- bytes copied -----END SUCCESS-----