Page 1 of 1 1
Topic Options
#160561 - 2006-04-08 05:01 PM Taking backup of Event Log
AstaaLavista Offline
Starting to like KiXtart

Registered: 2005-08-11
Posts: 111
Loc: Gujarat, India.
hi,

Is it possible to take backup of Event Viewer options like Application, Security. I want to automate this process using a script, so that at regular events, log is backed-up & event viewer is emptied.

Top
#160562 - 2006-04-08 05:13 PM Re: Taking backup of Event Log
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Look at BackupEventLog() in the manual.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#160563 - 2006-04-08 06:19 PM Re: Taking backup of Event Log
AstaaLavista Offline
Starting to like KiXtart

Registered: 2005-08-11
Posts: 111
Loc: Gujarat, India.
Hi Les,

Thanks for ur reply. i have written the kix script for the same.
I was just wondering if there is any feature provide in Windows Server 2003 to Archive any file (from command line) as well.

I dont want to use Winzip command line for archiving the files.
Thank you.

Top
#160564 - 2006-04-08 07:15 PM Re: Taking backup of Event Log
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
There is the MakeCAB() UDF.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#160565 - 2006-04-09 10:51 AM Re: Taking backup of Event Log
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
You can script NTBACKUP to backup specific files and then place it on a schedule.
Top
#160566 - 2006-04-09 06:07 PM Re: Taking backup of Event Log
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Another option would be to use an utility such as Event log to Syslog Get it here and then use this syslog Kiwi. It will automatically Zip all the files on whatever kind of schedule you want.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#160567 - 2006-04-09 10:38 PM Re: Taking backup of Event Log
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
or get MOM to do it.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#160568 - 2006-04-10 12:36 AM Re: Taking backup of Event Log
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Boy you guys are all grown up now, quit getting your MOM to do everything for you
Top
#160569 - 2006-04-10 12:47 PM Re: Taking backup of Event Log
AstaaLavista Offline
Starting to like KiXtart

Registered: 2005-08-11
Posts: 111
Loc: Gujarat, India.
Hi All,

I have some queries here. Since i have called many functions in my script, i suppose i cant make my script suitable for UDF, because there is no single function which does everything. So, after that, is my script still eligible for being posted as a UDF?

I could not find a function that returns the user profile directory: "c:\Documents and Settings\USER_NAME\My Documents". i dont think there is a macro for the above.

Top
#160570 - 2006-04-10 01:00 PM Re: Taking backup of Event Log
AstaaLavista Offline
Starting to like KiXtart

Registered: 2005-08-11
Posts: 111
Loc: Gujarat, India.
ok, got it...

I will have to do some thing like this:
$location = "c:\Documents and Settings\" + %userprofile% + "\My Documents\"

Top
#160571 - 2006-04-10 01:04 PM Re: Taking backup of Event Log
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
%USERPROFILE% is the full path to your profile directory - no need to catenate anything.

You can also pull the location for things like "My Documents" directly from the registry, which is more reliable than guessing.

Top
#160572 - 2006-04-11 08:41 AM Re: Taking backup of Event Log
AstaaLavista Offline
Starting to like KiXtart

Registered: 2005-08-11
Posts: 111
Loc: Gujarat, India.
hi all,
the script is done. thanks everybody.

The link is: BackupMiscEvent

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.068 seconds in which 0.032 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org