Cisco ASA Determine If Configuration Has Been Saved

cisco-asa

On the Cisco ASA, changes to the running-config are not automatically saved to the startup-config. This is done manually with "write memory" or "copy running-config startup-config" to write the changes to flash storage.

I would like to verify whether configuration changes have been saved rather than blindly saving repetitively (which I currently do). I've searched Google for commands to check whether the running-config changes have been saved to startup-config, and here are two ugly workarounds that I've found:

  1. "reload" command
    • Output of "System config has been modified. Save? [Y]es/[N]o:" when config needs to be saved.
    • Output of "Proceed with reload? [confirm]" when config has already been saved. ANSWER NO or similar to avoid needless reboot!!
  2. Copy BOTH your running-config AND startup-config to text files.
    • Use a "diff" utility to compare the text files for differences.

I would love to have a quick clean command or procedure to use to verify the configuration has been saved without risking an accidental reboot. Please post if you have suggestions.

Best Answer

I didn't find a single-command solution, but using a couple commands we can determine whether running configuration has been saved without using the "reload" command.

  • show running-config | include checksum:
  • show startup-config | include checksum:

If the checksum matches, then the running-config has been saved. You can also review the difference between last modification time of running-config and last save time of startup-config. This is less exact because the values will never be the same (startup-config should be newer than running-config after saving).

  • show version | include modified
  • show startup-config | include Written

I prefer the first solution comparing each checksum, but the alternate method comparing modification and written dates works well too.