archive download-sw
To download a new image from a TFTP server to the switch or switch stack and to overwrite or keep the existing image, use the archive download-sw command in privileged EXEC mode.
archive download-sw { /directory | /force-reload | /imageonly | /leave-old-sw | /no-set-boot | /no-version-check | /overwrite | /reload | /safe} source-url
Syntax Description
/directory |
Specifies a directory for the images. |
/force-reload |
Unconditionally forces a system reload after successfully downloading the software image. |
/imageonly |
Downloads only the software image but not the HTML files associated with embedded Device Manager. The HTML files for the existing version are deleted only if the existing version is being overwritten or removed. |
/leave-old-sw |
Keeps the old software version after a successful download. |
/no-set-boot |
Stops the setting of the BOOT environment variable from being altered to point to the new software image after it is successfully downloaded. |
/no-version-check |
Downloads the software image without verifying its version compatibility with the image that is running on the switch. On a switch stack, downloads the software image without checking the compatibility of the stack protocol version on the image and on the stack. This feature is supported only on the LAN Base image. |
/overwrite |
Overwrites the software image in flash memory with the downloaded image. |
/reload |
Reloads the system after successfully downloading the image, unless the configuration has been changed and has not saved. |
/safe |
Keeps the current software image. Does not delete it to make room for the new software image before the new image is downloaded. The current image is deleted after the download. |
source-url |
Specifies the source URL alias for a local or network file system. These options are supported:
image-name.tar is the software image to download and install on the switch. |
Command Default
The current software image is not overwritten with the downloaded image. Both the software image and HTML files are downloaded. The new image is downloaded to the flash: file system.
The BOOT environment variable is changed to point to the new software image on the flash: file system. Image files are case-sensitive; the image file is provided in TAR format.
Compatibility of the stack protocol version of the image to be downloaded is checked with the version on the stack.
Command Modes
Privileged EXEC
Command History
Release | Modification |
---|---|
Cisco IOS Release 15.0(2)EXCisco IOS Release 15.2(5)E |
This command was introduced. |
Usage Guidelines
The /imageonly option removes the HTML files for the existing image if the existing image is being removed or replaced.
Only the Cisco IOS image (without the HTML files) is downloaded.
Using the /safe or /leave-old-sw option can cause the new image download to fail if there is insufficient flash memory.
If you leave the software in place, the new image does not have enough flash memory due to space constraints, and an error message is displayed.
If you used the /leave-old-sw option and did not overwrite the old image when you downloaded the new one, you can remove the old image by using the delete privileged EXEC command.
For more information, see delete.
If you want to download an image that has a different stack protocol version than the one existing on the stack, use the /no-version-check option.
Note |
This feature is supported only on the LAN Base image. |
Note |
Use the /no-version-check option carefully. All members, including the active switch, must have the same stack protocol version to be in the same stack. This option allows an image to be downloaded without first confirming the compatibility of its stack protocol version with the version of the stack. |
Use the /overwrite option to overwrite the image on the flash device with the downloaded one.
If you specify the command without the /overwrite option, the download algorithm determines whether or not the new image is the same as the one on the switch flash device or is running on any stack members.
If the images are the same, the download does not occur. If the images are different, the old image is deleted, and the new one is downloaded.
After downloading a new image, enter the /reload privileged EXEC command to begin using the new image, or specify the /reload or /force-reload option in the archive download-sw command.
Examples
This example shows how to download a new image from a TFTP server at 172.20.129.10 and to overwrite the image on the switch:
Device# archive download-sw /overwrite tftp://172.20.129.10/test-image.tar
This example shows how to download only the software image from a TFTP server at 172.20.129.10 to the switch:
Device# archive download-sw /imageonly tftp://172.20.129.10/test-image.tar
This example shows how to keep the old software version after a successful download:
Device# archive download-sw /leave-old-sw tftp://172.20.129.10/test-image.tar
Device# archive download-sw /imageonly /destination-system 6 /destination-system 8 tftp://172.20.129.10/test-image.tar