Purge Old Files Script

John R. Ghidiu john at rmdashrf.org
Tue Oct 1 16:01:52 EDT 2002


if you are going the rsync route, you might want to consider this:

http://www.mikerubel.org/computers/rsync_snapshots/

john


On Tue, 1 Oct 2002, Darin Perusich wrote:

> 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
>
>
>

----------------------------
John R. Ghidiu
john at rmdashrf.org




More information about the nflug mailing list