Showing a daily backup job from a unique log file.

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Showing a daily backup job from a unique log file.
# 1  
Old 08-30-2009
Question Showing a daily backup job from a unique log file.

Hi guys,
Im a newbie in Linux, but Im trying to solve some problems studying on my own, but Ive had some problems with AWK.
Look, I have one single backup log file per server and I want to make a daily delection from the last backup job to show in a intranet of my work.
The log files are from ArcServe (Windows), so Id already made a batch file to export those backup logs to my Linux server which already have Apache running on it.
As you can see in the following code, Id put some lines of one of my servers. The backup log are so extensive, but whats really important I put in here. The first and the last line of this code, I suppose that is the key to select and export to a file for publish in my internal web page.
You need to keep on mind that is only a piece of the backup log.
My question, how to make this functional? I`ve already had some help in export the right fields, but work with another piece is one thing that I cant get on nowhere.
[05/19/2009-22:00:05 ,1,0,0,0,-1,2,3,0,0] [JOBQUEUE]: Status changed from Ready to Active [Job No: 2] [Description: ]
[05/19/2009-22:00:14 ,1,3164,0,0,-1,2,18,0,0] Run Backup Job Scheduled for  5/19/09 at 10:00 PM.
[05/19/2009-22:00:16 ,1,3164,0,0,-1,2,18,0,0] Start Backup Operation. (QUEUE=1, JOB=2)
[05/20/2009-02:49:23 ,1,3164,0,0,-1,2,18,0,0] Backup Operation Incomplete.
[05/20/2009-02:51:04 ,1,3164,4,0,-1,2,18,0,0] [CAT] TUESDAY [ID:5EDD,SESSION:4] is merged.(files=1986)
[05/20/2009-02:51:09 ,1,3164,5,0,-1,2,18,0,0] [CAT] TUESDAY [ID:5EDD,SESSION:5] is merged.(files=681)
[05/20/2009-02:51:12 ,1,3164,0,0,-1,2,18,0,0] Run Command: cmd /c C:\Program Files\CA\BrightStor ARCserve Backup\LOG\coletalog.bat.
[05/20/2009-02:51:13 ,1,3164,0,0,-1,2,18,0,0] Reschedule Backup Job for  5/20/09 at 10:00 PM.
[05/20/2009-02:51:13 ,1,0,0,0,-1,2,3,0,0] [JOBQUEUE]: Rescheduled for  5/20/09 at 10:00 PM [Job No: 2] [Description: ]

To export this log in nice way, this is the script that I had help......
nawk -f export.awk Arcserve.log
NF {
   split(substr($0, 2,index($0," ")-1),a, "-")
   print a[1] OFS a[2] OFS substr($0,pivot+1)

What I only need now is some way to separate the backup jobs.
Anyone have any idea?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Log error from cron job into log file

Hi Please would it be right to log the errors from a script running in cron in the following manner: /datax/vendor/ > /datax/vendor/err.log 2>&1 (16 Replies)
Discussion started by: fretagi
16 Replies

2. Shell Programming and Scripting

Change unique file names into new unique filenames

I have 84 files with the following names splitseqs.1, spliseqs.2 etc. and I want to change the .number to a unique filename. E.g. change splitseqs.1 into splitseqs.7114_1#24 and change spliseqs.2 into splitseqs.7067_2#4 So all the current file names are unique, so are the new file names.... (1 Reply)
Discussion started by: avonm
1 Replies

3. UNIX for Advanced & Expert Users

Count number of unique patterns from a log file

Hello Everyone I need your help in fixing this issue., I have a log file which has data of users logging in to an application. I want to search for a particular pattern in the log ISSessionValidated=N If this key word is found , the above 8 lines will contain the name of the user who's... (12 Replies)
Discussion started by: xtechkid
12 Replies

4. Shell Programming and Scripting

Daily grep on a log file

Hi, I would like to execute a daily grep like: grep 2010-09-06 statistics.log|grep API > /var/tmp/stat20100906_sp.txt On date e.g. 2010-09-07 run a grep on yesterday's date, from the result grep the word "API" put all in /var/tmp Would like to have a script configured in the crontab, running... (4 Replies)
Discussion started by: pointer
4 Replies

5. Shell Programming and Scripting

get part of file with unique & non-unique string

I have an archive file that holds a batch of statements. I would like to be able to extract a certain statement based on the unique customer # (ie. 123456). The end for each statement is noted by "ENDSTM". I can find the line number for the beginning of the statement section with sed. ... (5 Replies)
Discussion started by: andrewsc
5 Replies

6. Shell Programming and Scripting

Need help with finding unique string in log file

Shell script help Here is 3 sample lines from a log file <date> INFO <> abcd:ID= user login <date> DEBUG <> <nlah bla> abcd:ID=123 user login <date> INFO <> abcd:ID=3243 user login I want to find unique "ID" from this log... (3 Replies)
Discussion started by: gubbu
3 Replies

7. Shell Programming and Scripting

daily backup scripts.....

I want a script which zip the file older than 15 days and move the file to a particular folder...... That script want to run daily.......... Please provide me the script for doing that.....I am very poor in scripting.... (1 Reply)
Discussion started by: jayaramanit
1 Replies

8. UNIX for Dummies Questions & Answers

Help Creating Daily Cron Job

I need to create a cron job that will run daily to change permissions to a particular folder to 666 every 24hrs. I have no experience with crontab or cron jobs at all so if someone can guide me through this it would be a great help. The folder's example is 'www/test/htdocs' Also if you... (3 Replies)
Discussion started by: Xechno
3 Replies

9. Shell Programming and Scripting

cron job showing rc=1 msg

Hi, I m trying to schedule a shell script. But execution of cron job logs rc=1 message. Can anyone throw some light on this??? Thanks & Regards, Chaitrali. (1 Reply)
Discussion started by: Chaitrali
1 Replies

10. UNIX for Advanced & Expert Users

Showing Device Does Not Exist While Taking Backup

Friends, while taking backup on /dev/rmt/0cn it is showing device does not exists. I have checked /dev/rmt 0cn is present there with link file created in /devices/pci@8,700000/scsi@5/st@5,0:cn I have checked cd /devices/pci@8,700000/scsi@5 but st@5,0:cn is not there. But I found st@3,0:cn. ... (3 Replies)
Discussion started by: ailnilanjan
3 Replies
Login or Register to Ask a Question