General discussion

Locked

Retrieving log files from remote servers

By eliot.dalgleish ·
Hello,

I have a dumb question.I am trying to find a way to consolidate the log files from a backup application (Arcserve) on about 18+ remote servers.

I would like either download the files daily (after backups have finished) and analyse them for errors or do a diff check to see what has happened since last backup.I am just trying to make the process of checking these daily logs easier instead of mapping the remote drives and opening the files across the network.

Anyone have any suggestions ? FTP is out due to security policy,I have an administration account across the domain.Would like an app that I can execute from my desktop rather resining on individual servers.

Thanks in advance.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Are you looking for a batch file?

by tbragsda In reply to Retrieving log files from ...

.
You could use a simple batch file or two.

In on file list all your servers something like this;

call servername volume file (or whatever)
call servers.bat server1 vol1 arclog

in the second batch file something a little like this;
net use l: \\%1\%2
xcopy l:%3 c:\whatever
net use l: /delete

The first batch file calls the other for each entry. I could make it much more complete, with some error testing etc. Point is, is this what your looking for?

TBR

Collapse -

Needs more work, but this is the idea.

by tbragsda In reply to Are you looking for a bat ...

***** Call this batch file LogRetrieve.bat
::
:: Run this batch file. It will call the second batch for each line, and execute based on vars 1-4.
::
@Echo off
cls
Echo.
Echo Setting Current directory to C:\ServerLogs
Echo.
c:
cd \ServerLogs

Echo.
Echo Write Start status to MasterLog
Echo.
Echo. >> MasterLog.txt
Echo Started log retrieve on; >> MasterLog.txt
Date /t >> MasterLog.txt
Time /t >> MasterLog.txt
Echo. >> MasterLog.txt

:: Batch ServerName Volume Directory File
Call LogRetrieveDetail.bat EM-SVR-01 vol1 arcserve ArcLog.log
Call LogRetrieveDetail.bat EM-SVR-02 vol1 arcserve ArcLog.log
Call LogRetrieveDetail.bat DB-SVR-01 vol1 arcserve ArcLog.log
Call LogRetrieveDetail.bat DS-SVR-01 vol1 arcserve ArcLog.log

Echo.
Echo Write Complete status to MasterLog
Echo.
Echo. >> MasterLog.txt
Echo Completed log retrieve on; >> MasterLog.txt
Date /t >> MasterLog.txt
Time /t >> MasterLog.txt
Echo. >> MasterLog.txt


***** Call this batch file LogRetrieveDetail.bat
::
:: This batch gets called from LogRetrieve.bat.
::
Echo.
Echo Running retrieve for server %1. Getting file %4
Echo Running retrieve for server %1. Getting file %4 >> MasterLog.txt
Echo.
if not exist \\%1\%2\%3\%4 Echo File or server not available %1-%2-%3-%4
if not exist \\%1\%2\%3\%4 Echo File or server not available %1-%2-%3-%4 >> MasterLog.txt
xcopy \\%1\%2\%3\%4 %1-%2-%3-%4
if not exist C:\ServerLogs\%1-%2-%3-%4 Echo File not copied error
if not exist C:\ServerLogs\%1-%2-%3-%4 Echo File not copied error >> MasterLog.txt

Collapse -

Batch file is a possibility but an App maybe better

by eliot.dalgleish In reply to Are you looking for a bat ...

Thanks for your post.

I was hoping for an application that can manage the files and do a diff on log files.

We have staff with limited experience checking these logs so I was trying to simplify the collating and checking process.

Will investigate the script method as well as searching for an app that will do this.

Any sugesstions everyone ?

Many thanks

Back to IT Employment Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums