Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Showing a daily backup job from a unique log file. Post 302348857 by metalfreakbr on Sunday 30th of August 2009 05:46:49 AM
Old 08-30-2009
Question Showing a daily backup job from a unique log file.

Hi guys,
I´m a newbie in Linux, but I´m trying to solve some problems studying on my own, but I´ve 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 I´d 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, I´d put some lines of one of my servers. The backup log are so extensive, but what´s 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 can´t get on nowhere.
Code:
[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
export.awk:
Code:
BEGIN {
  OFS="\t"
}
NF {
   pivot=index($0,"]")
   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?
Thanks
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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 <java.com.blah> abcd:ID= user login <date> DEBUG <java.com.blah> <nlah bla> abcd:ID=123 user login <date> INFO <java.com.blah> abcd:ID=3243 user login I want to find unique "ID" from this log... (3 Replies)
Discussion started by: gubbu
3 Replies

6. 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

7. 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

8. 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

9. 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

10. 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/dump.sh > /datax/vendor/err.log 2>&1 (16 Replies)
Discussion started by: fretagi
16 Replies
DKOPP(1)							  Dkopp man page							  DKOPP(1)

NAME
Dkopp - copy files to DVD or BD (Blue-ray) media SYNOPSIS
dkopp [ -job | -run ] jobfile dkopp [ -nogui ] -script scriptfile DESCRIPTION
Dkopp copies files to backup DVD or BD media. It supports full or incremental backups and full or incremental media verification. OVERVIEW
Dkopp is a menu-driven GUI (GTK) program operating in its own window. Dkopp copies files and directories specified in a job file to DVD or BD media. Dkopp can copy all files to empty media (full copy), or only new and modified files to previously used media (incremental). Files and directories to include or exclude can be selected from the file system hierarchy using a GUI navigator. Specifications are saved in a job file which can be re-edited and re-used. Script files can be run in batch mode using the -nogui option. Dkopp can be used to select and restore files previously copied, and owner and permission data is also restored. The DVD/BD media can also be accessed with file system tools like Nautilus. Dkopp supports the following functionalities: - Three backup modes: full, incremental, accumulate. - Three media verification modes: full, incremental, thorough. - Use write-once or re-writable DVD or BD media (but not CD). - Report disk:backup differences in detail or summary form. - Select and restore files from a backup copy (or use drag and drop). - Search log files to find media where specified files are saved. OPTIONS
Command line options: [ -job ] jobfile open job file for editing -run jobfile execute a job file [ -nogui ] -script scriptfile execute a script file SEE ALSO
The online user manual is available using the menu Help > contents. This manual explains Dkopp operation in great detail. Dkopp uses the batch programs grwoisofs and genisoimage. Dkopp is essentially a GUI front-end for these programs. AUTHORS
Written by Mike Cornelison <kornelix2@googlemail.com> Linux 2010-10-01 DKOPP(1)
All times are GMT -4. The time now is 05:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy