Operating System - HP-UX
1836796 Members
2541 Online
110110 Solutions
New Discussion

how roll back the installed patch

 
SOLVED
Go to solution
sislove
Occasional Contributor

how roll back the installed patch

Hi wizards

I have packaged a patch using swpackage and created a depot.
i have installed that patch(depot) using swinstall.
now can anybody tell how to rollback the patch and how to take the back up of the old binaries when packaging the patch software.

Note -> the patch depot is created by me using swpackage, now i don't how to put a script so the i can also have roll back of the patch

can anybody tell how to take a backup of the old binaries when installing patch.

cheers !!
sislove


R&D is what I'm doing when I don't know what I'm doing.
-- Wernher von Braun
6 REPLIES 6
Todd McDaniel_1
Honored Contributor

Re: how roll back the installed patch

Your post is a bit confusing. Are you merely trying to remove the depot you created? OR are you trying to remove the patch? and go back to the previous version?

If you are trying to remove a patch simply reboot to the previous kernel, vmunix.prev.

Removal of the depot is a simple matter of rm on the depot.

If I am offbase post again and explain further.
Unix, the other white meat.
Steven E. Protter
Exalted Contributor

Re: how roll back the installed patch

SDUX is a patch management system. If you install patch b which supersedes patch a, the binaries will be preserved.

If you subsequently remove patch b, patch a will be active, unless you've run the cleanup command and committed your patches.

swremove will remove the patches. When you create your own depots this merely assists in installation, the patches are installed by the Patch ID.

To remove your depot, remove the components either one at a time or with swremove -i

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
sislove
Occasional Contributor

Re: how roll back the installed patch

Hi Protter and Todd,

what i have done is created a depot using swpackage for patch software.

Now i want to know whether i have to put a unconfigure scrift while packaging.

Tell me what swremove will do, whether it will excecute the unconfigure scrift to unconfigure the software or something else


with cheers
sislove
Jean-Louis Phelix
Honored Contributor
Solution

Re: how roll back the installed patch

Hi,

SEP is right. SD is a patch management system and will care about preserving old binaries and restoring them when swremoving patches (except if explicitly told not do it). Concerning scripts, they will be executed at required time (pre-installation, configuration, ...) only if they exist, but if you don't NEED them, forget them ...

Regards.
It works for me (© Bill McNAMARA ...)
doug hosking
Esteemed Contributor

Re: how roll back the installed patch

swremove is definitely the cleanest way to remove patches.

Look in /var/adm/sw/save to see how old
versions of the patched files are saved by
swinstall and restored by swremove. See
the 'patch_save_files' section of the swinstall manual page.

Todd, keep in mind that patches can affect many things other than the kernel. Although
vmunix.prev can be helpful in emergency recovery from a bad kernel patch install, it is only one step in the recovery process, and may not be relevant at all for removal of things like commands patches. If you don't actually remove the patch, as opposed to just deleting a bad vmunix file, the next time you rebuild a kernel (such as when changing some kernel tunable parameters) you would be back to the original problem, because the kernel will be rebuilt using the components you thought you had previously removed. swremove is intended to be smart enough to clean up from these conditions.


Jacko_3
Advisor

Re: how roll back the installed patch

Hi there..

if you have applied a newer patch on top of a superseded patch, to roll back to a previous state you only require to swremove the patch you just installed.

once you remove the patch you installed, and "if" you have previous/older version of the patch installed then your system will automatically roll back to that previous version.

Before swremove you could create a backup of your patch binaries using this command:
# cp -rp /var/adm/sw/save/PHKL_xxxxx /tmp/PKHL_xxxxx

Hope the above help.

cheers...