[SUMMARY] long -- Cleaning up patch backout files

From: Jerry Kemp <sun.mail.list47_at_oryx.cc>
Date: Mon Mar 30 2009 - 18:24:02 EDT
Thank you to the following who provided replies.  The original question 
is at the bottom.

Anthony D'Atri
David Foster
DRoss Smith
Crist Clark
hike
Christopher Barnard

*************************************************************
Anthony D'Atri

With modern disk sizes, I provision a /var slice large enough that I 
almost never need to worry about this any more.  In the past I've 
deleted save/* and been ok, though there have been a couple of recent 
occasions when I *did* need to back out patches and was very, very glad 
that I had them.  I've found that recent patch applications can be 
confused if the /save directories themselves are removed.

*************************************************************
David Foster

What I routinely do is determine the number of days after which I think 
I'm safe (won't need to back out a patch that's been installed for N 
days -- 180 days in the example below), and then do:

find /var/sadm/pkg -name "*.Z" -mtime +180 -exec rm {} \;

DON'T remove the entire ./save directory!! Take a look at what's in 
there, there are files from multiple patch revisions and you could be 
removing save files from a patch you installed yesterday.

*************************************************************
Dean Ross-Smith

and please summarize..
thanks!

*************************************************************
Crist Clark

What part of PCI standard compliance has something to do
with this?

*** PART OF MY ORIGINAL POST, DELETED HERE

I've always just done,

	# find /var/sadm -name undo.Z -o -name obsolete.Z | xargs rm

If you want to be a little more conservative, only kill the
"obsolete.Z" files.

*************************************************************
hike

with the size of hard drives today and sun's recommended one large
partition, there is no need to remove these.

now, if you have craved up your drives like the old days (<18gb hard
drives), you didn't follow the best practices for boot drive management that
sun publishes.  that is, you didn't keep current.  6 years ago was the era
of big drives (>=36gb hard drives)

regardless, back up all the information and delete to your little heart's
content.

with old systems (1995 vintage), i move to another filesystem and ln -s 
to the standard (and now removed) spot.

you could also, add disks and create a mount point for these.

whatever you do, you will probably need them later so have a good backup.

all that to say, i don't remove them and i don't recommend moving them.
I doubt you know the future.
*************************************************************
Christopher L. Barnard

What I do is cd into /var/sadm/pkg and then du an 'du -sk *'  Then for 
the biggest directories look into SUNWfoo/save.  I delete all old 
patches but the most recent one (ie, I keep 123456-16, but nuke 
123456-15, -14, etc.)  The reason I remain in /var/sadm/pkg is that I 
can then do a global delete.  If I determine that 123456-14 can be 
deleted from one package directory, it can be deleted from them all.  so 
from /var/sadm/pkg I do

/bin/rm -rf */save/123456-14

that removes it from any package directory it is in.  Usually a check of 
SUNWcsu, SUNWcsr, SUNWcsux, SUNWcsrx, SUNWarc, and perhaps SUNWmd is 
enough to clear up lots of space in /var.

*************************************************************




On 03/24/09 13:05, Jerry K wrote:
> Thanks to PCI (Payment Card Industry), I have recently found myself in a 
> place where I need to be able to clean up old patches on a large number 
> of Sun servers.
> 
> A search of the archives turned up this this email (below) from 2003.
> 
> Fast forward (6) years, and given Solaris 10, I am curious what others 
> are doing to clean up/out patches, after you have determined that you 
> will not need to back out.
> 
> The link below is dead, and was not archived in the WayBack Machine... :(
> 
> Thanks for any replies, I will summarize.
> 
> Jerry
> 
> 
> 
> 
> 
> 
>> Hello Guru's
>>
>>  The email from Tim Villa below and the link provided by Alan Bradley state
>> more-or-less the same thing: Just delete the save files to free up the
>> space.
>>
>> Alan's link is:
>>
>> http://www.ucf.ics.uci.edu/pipermail/unix-admin/2002-September/001079.html
>>
>> Tim's response and my original message below.
>>
>> I just manually rm the directory in /var/sadm/pkg/PACKAGE/save, that's
>> never done me any harm  :-) 
>>
>> You'll want to find out all the packages a patch affects - you can get the
>> patch install directory (just look up the SUNW* names really).
>>
>> Tim
>>
>> At 09:12 AM 18/02/2003 +0200, you wrote:
>>>> Hi all,
>>>>
>>>> Does anybody know of a way to clean up the patch backout files and the
>>>> showrev database?
>>>>
>>>> Once a 3rd or 4th instance of a patch has been applied over the previous
>>>> ones, I'd like to remove some of the old backout files, but generally once
>>>> I know that an applied patch does not have any adverse effects, I'd like
>> to
>>>> delete all the old files without creating stale / dead references anywhere
>>>> (such as in the showrev database)
>>>>
>>>> Any alternative / similar ideas or solutions you use are welcome!
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Mon Mar 30 17:25:00 2009

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:13 EST