I recently had the need to upgrade the IOS on a Cisco switch (think it was a 3750). As usual, the flash was too small so I needed to remove (and archive/save) the old IOS before putting the new one on. A lot of the images these days include HTML and other things, so are contained in folders rather than a single file. So, how do you take a backup of the image, delete it, and install the new one, without doing each file individually?

It used to be as simple as

copy flash:imagename.bin

Thankfully it’s no more difficult to use the archive functionality, just some new commands to learn.

To archive the files to an FTP server, use:

archive tar /create flash:directoryname

To delete all of the files, including the directory, use:

delete /force /recursive flash:<directory name>

And to copy it back on to the device, and unarchive it at the same time:

Archive tar /xtract flash:

Nick Shaw

Nick Shaw

I'm Nick, a knowledgeable and versatile security focussed network specialist. I have years of experience delivering complex projects for large and small organisations alike. As a full-stack engineer, I look at the end to end requirements and come up with a solution to match, rather than focussing just on one aspect. When I'm not working, I have three main interests: my family, football (Barnsley FC) and motorsports.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.