Purge Old Files Script

Justin Bennett Justin.Bennett at dynabrade.com
Tue Oct 1 14:53:09 EDT 2002


good idea, I was doing something similar for a while with a couple Large
80GB IDE drives (we use scsi for production data) and copying to them
daily to have a live snapshot of last nights data. They have since been
converted to a mirrored set containing 40GBs+ of mp3s, though. We have one
group of engineers who happen to delete their files often, so I still back
them to tape nightly, but I gave one of their guys a DVD RAM and let him
make a copy also, so when they blow something away they bug him....

Justin

Darin Perusich said:
> one thing that you might find interesting is rsync these files daily, or
>  multiple times daily to another server. this really saves on restore
> time when joe luser accidently deletes a file. we've setup multiple
> levels of rsync here, this way we can to back and get files that are a
> few days old and if they dont' exist then we go to tape.
>
> Justin Bennett wrote:
>> I hear you, everything is backed up nightly to tape. So if they loose
>> something I could get it back, I have been pushing for quotas for a
>> while, however management is reluctant to go that route. Don't ask me
>> why. Anyways I'll take a look at this. I'm not so worried about
>> symlinks and such, no user has shell acces on this box, only via
>> samba, but I hear the concern.
>>
>> Thanks
>> Justin
>>
>> Jason Parker-Burlingham said:
>>
>>>"Justin Bennett" <Justin.Bennett at dynabrade.com> writes:
>>>
>>>
>>>>ok will put something based on this info, thanks everyone who
>>>>replied. I assume the -type f is files, howbout blowing away empty
>>>> directories then?
>>>
>>>Why reinvent the wheel?
>>>
>>>tmpreaper is what you want; someone else has already done the dirty
>>> work of deciding what is and what is not appropriate to do when search
>>> for, and deleting files like this.  Doing it yourself will only open
>>> you up to mistakes which are potentially *VERY* costly (have you
>>>considered what would happen if the search followed a symlink back to
>>> /etc, for example?).
>>>
>>>I imagine tmpreaper is available for most Linux distrubutions (it's
>>> available for Debian users) or can be compiled with little effort,
>>> probably less than it would to cover all bases yourself.
>>>
>>>Alternatively, I find a good quota system ensures users either clean
>>> up files on their own, or come to me to explain why they need more
>>> space.
>>>
>>>On the gripping hand, you may also want to look into ensuring the
>>> files are backed up somewhere before they are deleted in case a
>>>deletion catches one of your users (and you) by surprise.
>>>
>>>Cheers,
>>>
>>>jason
>>>--
>>>||----|---|------------|--|-------|------|-----------|-#---|-|--|------||
>>> | ``Ooooaah!
>>>| |   I'm getting so excited about cheese-making I can't stand it!''
>>> |
>>>||--|--------|--------------|----|-------------|------|---------|-----|-|
>>>
>>>--
>>>This message has been scanned for viruses and
>>>dangerous content by Dynabrade using Mailscanner,
>>>and is believed to be clean.
>>
>>
>>
>
>
> --
> Darin Perusich
> Unix Systems Administrator
> Cognigen Corp.
> darinper at cognigencorp.com
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by Dynabrade using Mailscanner,
> and is believed to be clean.


-- 
-------------------------------------------
Justin Bennett
Red Hat (Linux) Certified Engineer
Network Administrator
Dynabrade Inc.
8989 Sheridan Dr
Clarence, NY 14031
716-631-0100 ext 215




More information about the nflug mailing list