logrotate and logfiles.

Brian Densmore DensmoreB at ctbsonline.com
Mon Apr 1 20:02:42 CST 2002


> > Yes, you'll need to fdisk (that'll destroy all data on /backup). 
> 
> That's not an option.  I could sym link /var to /backup/var 
> couldn't I?
Yes. It must be a "softlink" (i.e. ln -s)
Timing may be an issue here. Be careful. I would create /backup/var
first.
Then make the sym link. If you can, telinit level 1 and stop the log
daemons.
Before making the actual link mv all /var files and subdirectories over
making sure to preserve ownership and rights and such [this frees up the
harddisk space, and is dangerous to do on a system with any open files
in /var]. This is something I would consider doing during some major
system maintenance. You really don't need to do this, but it is much
safer to do. If you have some scheduled downtime for the box that would
be the time to do it. After you backup the system.

> 
> Thanks again (very much) and thanks for your patience.
> 
> ER
> 
> P.S.  We have a new supergeek here in the office who runs 
> circles around
> me.  I believe I remember him setting here and deleting something and
> saying "I pull this out because I like rotating my own log 
> files" which
> would splain everything.  I asked him about it this morning, (before
> troubling you folks)  and he said "I don't remember."  So, if 
> my memory
> serves me correctly, what would he have yanked, and how would I put it
> back?  Is there a default command for logrotate that has been deleted
> from my cron files???  This is a RH 7.0 system, 2.2.16-22 kernel.
Aha! Your supergeek deleted the cron job entry. Tell him to put it back,

or maintain the logs!

or

Create this file and drop it in the cron.daily directory

[root at dunsmuir /etc]# cat cron.daily/logrotate

#!/bin/sh

/usr/sbin/logrotate /etc/logrotate.conf

> 
> P.S.S.  There was a thread going around some time ago about getting
> together for informal class-room type instruction concerning 
> Linux.  Did
> anything ever come of this? Did I miss something?  Am I out 
> of the loop?

I haven't seen anything develop yet.

Good luck,

Brian




More information about the Kclug mailing list