log retention in aix , linux

Hi ,

I need to ensure that log is retained for 400 days in linux and aix server . How to implement it

Thanks  
apunkabollywoodAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TintinCommented:
What type of log?
What process logs to it?
Do you want to delete or compress it after 400 days?
Do you want to regularly rotate the file?
0
apunkabollywoodAuthor Commented:
Log related to wtmp , sulog failedlogin activities ,
I want to keep logs for 400 days
in compress format after 400 days
also tell me how to rotate this to another server in the case do not have space on server
0
madunix (Fadi SODAH)Commented:
in Linux you have to use logrotate utility
http://www.linuxjournal.com/article/5314
http://gd.tuwien.ac.at/linuxcommand.org/man_pages/logrotate8.html

edit /etc/logrotate.conf which defines what logrotate does and how. Configuration parameters exist in both a global configuration file and one for each subsystem. The global file is (by default) /etc/logrotate.conf while the subsystem specific definitions are in the directory /etc/logrotate.d.
my configuration  it looks
[root@linux1 ~]# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files weekly
weekly
#daily

# keep 4 weeks worth of backlogs
rotate 4
# rotate 30

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    minsize 1M
    create 0664 root utmp
    rotate 1
}

# system-specific logs may be also be configured here.


madunix
0
woolmilkporcCommented:
Hi,
you can get logrotate for AIX from here -
http://www.perzl.org/aix/index.php?n=Main.Logrotate
Please mind the dependencies - you will need additionally
- coreutils - http://www.perzl.org/aix/index.php?n=Main.Coreutils
- popt - http://www.perzl.org/aix/index.php?n=Main.Popt
- gettext - http://www.perzl.org/aix/index.php?n=Main.Gettext
and maybe some other packages. It's all mentioned on the above web pages.
Install the packages using "rpm -i filename_of_downloaded_package"
rpm is shipped with AIX - no need to install it.
You should check carefully that the rotated logs are included in your regular backups and that the retention period of these backups is long enough. 400 days are a rather long time - who knows what might happen to your harddisks?
(Most probably nothing, I know, but why take a risk?)
wmp
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
apunkabollywoodAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
OS Security

From novice to tech pro — start learning today.