How to take the backup of log basing on size


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to take the backup of log basing on size
# 1  
Old 04-19-2010
Bug How to take the backup of log basing on size

Hi All,

I have a small doubt, there is one process which is writing the log file. That log file is getting overwritten every 5 hours. As i donot want to lose the data, i want to write a script which will check the max. file size defined for the file and take the backup of the file before overwritting.

I hope that i am clear.

Thanks Smilie
# 2  
Old 04-19-2010
Logrotate can do that for you.

Write a cron job for invoking logrotate every 5 hours.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pick a line in file 2 basing on array in file1

Dear friends, I have two files. One with all IDs(in a single field) . And another with data(of which say field 5 is ID). I want to create an array of IDs using first file and while reading second file if the ID appears in the array I need to print $0 else skip. After a long gap I am... (6 Replies)
Discussion started by: paresh n doshi
6 Replies

2. Solaris

Backup Tape Size

Hello guys anyone know how to check the size of files in the a backup tape?:confused::confused::confused: (2 Replies)
Discussion started by: Mohammad.ak
2 Replies

3. AIX

sysback - estimate backup size only?

Is there a flag to send to sysback on the command line so it will return the estimated backup size and exit? We're having issues with running to a second tape at a remote data center, and I want to alter the script to exit or add exclusions if the backup is over a certain size. The other... (0 Replies)
Discussion started by: tommysalami
0 Replies

4. Shell Programming and Scripting

Split a single file into several others basing on the last column

Hi folks, Happy new year. I have a file 'filename' that i wd like to split basing on the contents in the last column. The 'filename' content looks like 256772744788,9,11 256772744805,9,11 256772744792,9,11 256775543055,10,12 256782625357,9,12 256772368953,10,13 256772627735,10,13... (3 Replies)
Discussion started by: jerkesler
3 Replies

5. Filesystems, Disks and Memory

How to create mondo backup for size > 4.5 GB

Hello Friends, I use mondoarchive to take a bootable backup of my system on a DVD. But whenever there are large files on the system, i.e. the size of the entire backup increases beyond 4.5 GB, the mondoarchive utility does not take any backup. This is quite obvious because the size of DVD is... (1 Reply)
Discussion started by: shamik
1 Replies

6. Shell Programming and Scripting

Split a binary file into 2 basing on 2 delemiter string

Hi all, I have a binary file (orig.dat) and two special delimiter strings 'AAA' and 'BBB'. My binary file's content is as follow: <Data1.1>AAA<Data1.2>BBB <Data2.1>AAA<Data2.2>BBB ... <DataN.1>AAA<DataN.2>BBB DataX.Y might have any length, and contains any kind of special/printable... (1 Reply)
Discussion started by: Averell
1 Replies

7. UNIX for Dummies Questions & Answers

tape backup size

How can I tell how much tape is left (or how much tape has been used) after doing a backup? My system is on Solaris 5.8. (2 Replies)
Discussion started by: shorty
2 Replies

8. UNIX for Dummies Questions & Answers

actual filesystem size during backup

Scenario............ ufsdump 0uf /dev/rmt/0n / root has 10GB available but only 5GB are used. Does the backup record the entire 10GB regardless of whats actually used or just the 5GB being used? (1 Reply)
Discussion started by: shorty
1 Replies

9. UNIX for Dummies Questions & Answers

Check backup file size on backup tape

Hi, I performed backup on tape and I want to append more files to my previous backup on the same backup tape. But before I do that I need to know the backup file size of the first backup I performed so that I know the available size on the backup tape. Can someone help me what command I will use... (0 Replies)
Discussion started by: ayhanne
0 Replies

10. UNIX for Advanced & Expert Users

How to check the size of the backup from the tape?

Hi, How can I check the size of the databse/filesystem in the tape (4MM or 8MM)? For example, I want to restore some databse/filesystem backup to the system. Before that I wanna check the size of that from the tape.Please help me regarding..... Regards, Sharif. (0 Replies)
Discussion started by: sharif
0 Replies
Login or Register to Ask a Question