Similar to the idea of a database rollback, Cisco IOS Software Modularity can roll back to a set of installed files defined by a tag.
There are 3 Cisco-defined tags that are created by default:
- CISCO_BASE - This tag is defined as the base image with no patches or other tags. Using this tag with the install rollback command takes you back to the installed bsae image.
- CISCO_LATEST - This tag is defined as removing one level of install file. Using this tag with the install rollback command removes the set of files that were added with the last install file command entry. If the patch is in an active state, it will set the patch to a PendRoll state meaning that the changes will not take place until the install activate command is entered. If the patch as been installed but not activated, the install rollback command removes the installed patch.
- CISCO_LATEST_ACTIVATE - This tag is defined as removing one level of install activation. Using this tag with the install rollback command removes the set of files that were most recently activated by the install activate command. If multiple maintenance packs or patches werer installed with the install file command and then got activated simulatenously with a single install activate command, all files are marked to be rolled back.
Create Tag
1. To create a tag, execute the "install commit" command as seen below:
6500-x#install commit disk0:/sys ospf_fix
2. To verify what tags have been installed:
6500-x#show install tags running
Tags defined over software running on location s72033_rp - Slot 1 :
Tagname # of Files Date Committed
------------------------------- ---------- ------------------------
ospf_fix 2 19:31:48 UTC May 9 2006
Tags defined over software running on location s72033 - Slot 1 :
Tagname # of Files Date Committed
------------------------------- ---------- ------------------------
ospf_fix 1 19:31:48 UTC May 9 2006
Repackaging
The repackage feature will copy all necessary files to a single binary file which can be installed on another system. The "install repackage" command will be used.
6500-x#install repackage disk0:/sys disk0:/lab_repackage.bin
To verify, execute dir disk0:
6500-1#dir disk0:
Directory of disk0:/
1 -rwx 69213304 Apr 25 2006 20:08:28 +00:00 s72033-ipservicesk9-vz.sx4-demo
2 -rwx 636416 Apr 25 2006 20:10:44 +00:00 s72033-XMA0001.122-18.SXF4
3 -rwx 769024 Apr 25 2006 20:11:20 +00:00 s72033-XMA0002.122-18.SXF4
4 -rwx 1287168 Apr 25 2006 20:11:46 +00:00 s72033-XMA0003.122-18.SXF4
5 drwx 1 May 9 2006 18:08:48 +00:00 sys
81 -rwx 69963776 May 9 2006 19:44:08 +00:00 lab_repackage.bin
512065536 bytes total (278913024 bytes free)
Rollback
Execute "install rollback" to roll the system back:
6500-x#install rollback disk0:/sys ospf_fix
Verify the patch is in the "PendRoll" state:
6500-1#show install running
Software running on card installed at location s72033_rp - Slot 1 :
B/P C State Filename
--- - -------- --------
B * Active disk0:/sys/s72033_rp/base/DRACO2_MP
MP Maintenance Pack MA0001.122
P * Active disk0:/sys/s72033_rp/patch/patch-XAA2101-00-0-n.so
MP Maintenance Pack
P PendRoll disk0:/sys/s72033_rp/patch/patch-XAA2102-01-0-n.so
Software running on card installed at location s72033 - Slot 1 :
B/P C State Filename
--- - -------- --------
B * Active disk0:/sys/s72033/base/s72033-ipservicesk9-vm(12.2(20060403:18507))
Next step to activate the rollback by issuing the install activate command:
6500-x#install activate disk0:/sys
To remove the ospf_fix tag:
install prune disk0:/sys ospf_fix
No comments:
Post a Comment