Configuration Archive and Rollback on Cisco IOS

This topic is to discuss the following lesson:

Thanks!!! Great job…

Nice LAB thanks !!

I think the topic for archive is good but you didnt say much about rollback. In this topic are missing such commands as
configure terminal revert timer and some others

Hi Tatyana,

I will add these extra commands, sounds like a good idea.

Rene

Hi,

I have the error
Cannot set maximum when backing up to network path"
when I try to set the maximum value of backups.

Can you help me?

Hello Giovanni

The maximum value has meaning only when backing up the configuration files locally. Configs are saved locally if the flash (or other local storage location such as disk0) is chosen as the path destination. This maximum feature is used to ensure that you are not going to run out of space on the local storage device as this is usually limited in size. In such a case, after the maximum number of files has been saved in the archive, the oldest file is automatically deleted when the next, most recent file is saved.

If the path you choose is a network path, that is, if you choose ftp, http, https, tftp, or some other supported network protocol, then the maximum number of archived config files is actually unlimited. Management of the storage space on remote network devices is performed on those devices, and cannot be enforced via the CLI of the IOS device. For this reason, the maximum cannot be configured when backing up to a network path.

I hope this has been helpful!

Laz

1 Like

Hi Team,

snapshots means it will take entire saved configuration as an backup am i right?

while comparing two files what are thing added newly compare to old one showing +

and what are the things missing from old config using _ right

Hello Gowthamraj

Yes, each snapshot is found within a different file, and is composed of the entire configuration at the time of backup. The differences when comparing files between them are indicated according to the following:

  • A minus symbol (–) indicates that the configuration line exists in file1 but not in file2.
  • A plus symbol (+) indicates that the configuration line exists in file2 but not in file1.
  • An exclamation point (!) with descriptive comments identifies order-sensitive configuration lines whose location is different in file1 than in file2.

You can find out more information about this feature at the following Cisco documentation:

I hope this has been helpful!

Laz

HI Laz,

I have a weird issue when using below config

archive   
 log config
  logging enable
  notify syslog contenttype plaintext
  hidekeys
 path flash:/Configuration__
 maximum 14
 write-memory

I am writing to local flash, however the max 14 command do not seem to always work and I get lots more copies which fills up flash storage. It’s weird as it doesn’t effect all devices on the same IOS just some.

I’m wondering if its some bug

Hello Jason

It does sound like an unusual issue you’re encountering. The maximum 14 command should indeed limit the number of backup configurations to 14. It does sound like a bug, especially since some of your devices are functioning correctly while others are not.

The following link verifies the behavior of the archive feature when issuing the maximum command.

https://www.cisco.com/c/en/us/td/docs/ios/fundamentals/command/reference/cf_book/cf_a1.html#wp1021238

Specifically, it states the following:

After the maximum number of files has been saved in the archive, the oldest file is automatically deleted when the next, most recent file is saved.

If you have a Cisco contract, I suggest you open a TAC case since this is indeed unexpected behavior. Let us know how you get along!

I hope this has been helpful!

Laz

Cool thanks for your guidance again very helpful, I think it maybe a bug too.

1 Like

Hi Laz,

I may have found a pattern into having more config archive’s in flash than 14 Max. Its seems when the device loses power or reloads the Archive Max 14 seem to restart and ignores all previous stored configs. So if you have a device running in an unstable environment that causes the device to constantly lose power, it seems you will soon run the risk of filling up your flash.

Not sure if this is something that you have come across?

Kind Regards

Jason.

Hello Jason

That is an interesting discovery. It seems that there is an internal counter that the device uses to keep track of how many configs have been backed up. That counter seems to be reset to 0 once the device has been reloaded, so you can eventually get more than 14 backup files.

One thing you can do to test this theory is to issue the show archive command. This provides information about the existing configuration archive files. This command will list all the archived configurations along with their index numbers. By counting these, you can determine how many archives are currently stored. You can compare this with a list of the actual files in the flash. After a reboot, see if the list in the output and the actual files in the flash correspond to each other. If there are more files in the flash, then those backups that were made before the reload are indeed not kept track of as far as the maximum archive count goes.

Take a look at this command reference for more info on the show archive command.
https://www.cisco.com/c/en/us/td/docs/ios/fundamentals/command/reference/cf_book/cf_s1.html#wp1072078

Unfortunately, there’s no command that explicitly tells us the current counter of archives. Try this out and let us know your results.

I hope this has been helpful!

Laz