Sponsored Content
Full Discussion: Need help with logrotation
Operating Systems Linux Fedora Need help with logrotation Post 302372397 by renuka on Tuesday 17th of November 2009 11:16:25 PM
Old 11-18-2009
Java Need help with logrotation

Hi

I need help in rotating logs.
A folder /tftpboot holds following directories, these directories are created everyday automatically, these are backup folders, that is they hold backup of data.
drwxr-xr-x 2 phone phone 4096 Nov 1 13:19 1nov09.bkp
drwxr-xr-x 2 phone phone 4096 Nov 2 13:19 2nov09.bkp
drwxr-xr-x 2 phone phone 4096 Nov 3 13:19 3nov09.bkp
drwxr-xr-x 2 phone phone 4096 Nov 4 13:19 4nov09.bkp
drwxr-xr-x 2 phone phone 4096 Nov 5 13:19 5nov09.bkp
drwxr-xr-x 2 phone phone 4096 Nov 6 13:19 6nov09.bkp
drwxr-xr-x 2 phone phone 4096 Nov 7 13:19 6nov09.bkp
drwxr-xr-x 2 phone phone 4096 Nov 8 13:19 6nov09.bkp

I need to set up an entry in logrotate to delete these backup directories in /tftpboot directory that are greater than 1 week old.
Can someone help me how to do the same?
 

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Logrotation

Hi , We have so many log files which will increase the size day by day.. can any one let us know how to rotate the log files.. I want to move the logfile to other location after particular time and size of the log file is there any script to change these?? (2 Replies)
Discussion started by: phani4u
2 Replies

2. Solaris

Problem with logrotation

Hi, I have been trying to configure log rotation for the OS version Solaris 10, however it is not working. In Linux, these would be the parameters : rotate 4 missingok notifempty compress size 15M create 0644 root root To do the same in Solaris, I am not sure of the exact parameters... (3 Replies)
Discussion started by: anaigini45
3 Replies
backup(1M)																backup(1M)

NAME
backup - backup or archive file system SYNOPSIS
[-archive] DESCRIPTION
The command uses find(1) and cpio(1) to save a archive of all files that have been modified since the modification time of on the default tape drive should be invoked periodically to ensure adequate file backup. The option suppresses warning messages regarding optional access control list entries. backup(1M) does not backup optional access control list entries in a file's access control list (see acl(5)). Normally, a warning message is printed for each file having optional access control list entries. The option causes backup to save all files, regardless of their modification date, and then update using touch(1). prompts you to mount a new tape and continue if there is no more room on the current tape. Note that this prompting does not occur if you are running from cron(1M). The option causes to start a file system consistency check (without correction) after the backup is complete. For correct results, it is important that the system be effectively single-user while is running, especially if is allowed to automatically fix whatever inconsisten- cies it finds. does not ensure that the system is single-user. You can edit to customize it for your system. Several local values are used that can be customized: specifies which directories to back up recursively (usually meaning all directories); file name where start and finish times, block counts, and error messages are logged; file name whose date is the date of the last archive; file name that is checked by to remind the next person who logs in to change the backup tape; file name where start and finish times and output is logged. You may want to make other changes, such as whether or not does automatic correction (according to its arguments), where output is directed, other information logging, etc. In all cases, the output from is a normal archive file (or volume) which can be read using with the option. File Recovery creates archive tapes with all files and directories specified relative to the root directory. When recovering files from an archive tape created by you should be in the root directory and specify the directory path names for recovered files relative to the root directory When specifying the directory path name for file recovery by do not precede the leading directory name with a slash. If you prefer, you can also use with a option to determine how files and directories are named on the archive tape before attempting recovery. WARNINGS
Refer to in cpio(1). When runs out of tape, it sends an error to standard error and demands a new special file name from To continue, rewind the tape, mount the new tape, type the name of the new special file at the system console, and press If is being run unattended from cron(1M) and the tape runs out, terminates, leaving the process still waiting. Kill this process when you return. FILES
parameterized file names SEE ALSO
cpio(1), find(1), touch(1), cron(1M), fbackup(1M), frecover(1M), fsck(1M), acl(5). backup(1M)
All times are GMT -4. The time now is 08:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy