Cisco IOS upgrade c3560_backup and deletion of drwx

s das
s das used Ask the Experts™
on
Hi, Im trying to upgrade the IOS version of a 3560 series switch and want to know how to back up (just to be safe if the ios upgrade fails) and delete the old IOS image files to make space for the new image. Assuming the below  

>dir flash:
Directory of flash:/

    2  -rwx         736  Feb 28 1993 18:04:32 -06:00  vlan.dat
    3  -rwx    10473517  Sep 16 2010 00:43:30 -05:00  c3560-advipservicesk9-mz.122-44.SE3.bin
    4  -rwx       22799  Feb 28 1993 18:09:22 -06:00  D2ILOAC04.cfg
    6  -rwx    12752928   Apr 4 2013 15:52:00 -05:00  c3560-ipservicesk9-mz.122-55.SE5.bin
    7  -rwx        3840  Jan 25 2017 01:07:35 -06:00  private-config.text
    8  -rwx        4120  Jan 25 2017 01:07:36 -06:00  multiple-fs
    9  -rwx       22060  Jan 25 2017 01:07:35 -06:00  config.text


im using the below commands for upgrade. and my question is, can the delete the "drwx" with the commands below??

> copy running-config flash:xxxxxxxxxxxx.cfg

(Pushing from Switch to Server)
> copy flash tftp
      at prompt for source type "c3560-ipservicesk9-mz.122-55.SE5.bin" (might need to insert flash: before C3560)
      at prompt for address type "xx.xxx.x.xx"
      at prompt for destination type "switchios/c3560-ipservicesk9-mz.122-55.SE5.bin"

(Pushing from Switch to Server)

> copy flash tftp
      at prompt for source type "c3560-advipservicesk9-mz.122-44.SE3.bin" (might need to insert flash: before C3560)
      at prompt for address type "xx.xxx.x.xx"
      at prompt for destination type "switchios/c3560-advipservicesk9-mz.122-44.SE3.bin"


(Pushing from Switch to Server)

>copy flash tftp
      at prompt for source type "xxxxxxxxxxxx.cfg" (might need to insert flash: before xxxxxxxxxxx.cfg)
      at prompt for address type "xx.xxx.x.xx"
      at prompt for destination type "switchios/xxxxxxxxxx.cfg"


> del flash:c3560-advipservicesk9-mz.122-44.SE3.bin

> show flash: (squeeze if neccessary) - to verify


(Pulling from Server to Switch)

> copy tftp flash
      at prompt for address type "xx.xxx.x.xx"
      at prompt for source type "switchios/c3560-ipservicesk9-mz.122-55.SE11.bin"
      at prompt for destination type "c3560-ipservicesk9-mz.122-55.SE11.bin"
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2018

Commented:
Check current boot image by issuing:
sh boot
There is no need to backup version that it is not listed as system boot

You need to change boot order after you copy new IOS c3560-ipservicesk9-mz.122-55.SE11.bin

boot system flash:c3560-ipservicesk9-mz.122-55.SE11.bin

Recommended would be to delete old IOS versions after you make sure that new version is booted properly (delete just IOS that is not listed as in boot section prior to upgrade).
You can save running to startup config prior to upgrade.
wr mem

Additionally there is no need to copy configuration back to switch after IOS upgrade if everything is OK during upgrade. Startup configuration will be present on device (if you save running configuration as startup config).

Author

Commented:
Thanks for the reply Jovic,

I think there isn't enough space to get the new IOS bin file into the flash, this is 3560 and I'm confused between on deleting the directory

To be precise:
1. Can I delete the -drwx file from flash?? If so how ?

2. Which is better? Deleting the -drwx (file here doesn't have .bin extension) or -rwx ( file here has the .Bin extension)

Thanks
Distinguished Expert 2018
Commented:
You don't have directories according to your output since extension of files are xxx.bin
If those are folders there typically would be no extension. In that case you would need to use
delete /force /recursive <foldername>
to be able to delete folders with files inside.

Typically there is enough place on 3560 for at least 2 IOS images (if I remember correctly IOS 12.x is 10-15MB size). So delete one of those 2 IOSs that are currently present.
 :)
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Yes exactly, the other c3560 have the output as below..
dir flash:
Directory of flash:/

    2  -rwx       20491  Feb 28 1993 18:08:52 -06:00 xxxxxx.cfg
    3  -rwx    12752912  Jun 15 2013 22:58:55 -05:00  c3560-ipservicesk9-mz.122-55.SE6.bin
    4  -rwx         736  Feb 28 1993 18:02:43 -06:00  vlan.dat
    5  -rwx       20056  Aug 30 1993 16:17:22 -05:00  config.old
    6  -rwx        3096   Feb 2 2017 00:25:22 -06:00  multiple-fs
    7  drwx         128  Jun 15 2013 22:56:06 -05:00  c3560-ipservices-mz.122-35.SE5
    8  -rwx       21171   Feb 2 2017 00:25:22 -06:00  config.text
  465  -rwx        3843   Feb 2 2017 00:25:22 -06:00  private-config.text

in this case, can I use the below ??

delete flash: c3560-ipservices-mz.122-35.SE5

Also, im using the below to verify, please correct me if im wrong

- show flash:
- config t
- no boot system flash:c3560-ipservicesk9-mz.122-55.SE6.bin
- no boot system flash:c3560-ipservices-mz.122-35.SE5
- boot system flash:c3560-ipservicesk9-mz.122-55.SE11.bin
- exit
- wri mem

Thanks a lot
Distinguished Expert 2018
Commented:
Since this is folder, no you will have to use:

delete /force /recursive c3560-ipservices-mz.122-35.SE5

and there is no need to delete previous boot just write a new one
boot system flash:c3560-ipservicesk9-mz.122-55.SE11.bin

Author

Commented:
Thanks Jovic, this truly helped
Distinguished Expert 2018

Commented:
You're welcome.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial