Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Automatic Backup of Event Logs


  • Please log in to reply

#1
jdstockman

jdstockman

    New Member

  • Member
  • Pip
  • 7 posts
Are there any tools or command-line scripts to back up server event logs automatically? Would like something that will allow me to customize the file name (i.e. sec041306.evt, app041306.evt, etc.) We have a combination of 200/2003 server. Maybe even something that will work on XP workstations?

Thanks
  • 0

Advertisements


#2
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
jeeze..i wrote a batch file for someone here for something similar for one of their log files....

you would basically need to copy the file out to a new location once a day then rename the file ....

was somehting like

copy "c:\<pathtolog>\<filename>" "<destination>"
ren "c:\<pathtofile>\<filename>" "<newfilename>" %date%

i seem to recall having to change the date seperator to - so that the file would display..because if the date uses a space or a / or a \ then the batch terminates because it can't find the file..i'll look around for the original syntax..
  • 0

#3
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
copy c:\windows\system32\config\appevent.evt  c:\test
ren c:\test\appevent.evt "appevent%date%.evt
pause

that will make a DIRECT copy of the applications event log in the evt format named "appeventThu 04-13-2006.evt"

then you could just schedule that task..not sure on automatically clearing the log files so that you're not just coppying all the same info...though if you did this only once a week...or once a month...it would make sense...
  • 0

#4
jdstockman

jdstockman

    New Member

  • Topic Starter
  • Member
  • Pip
  • 7 posts
Thank you very much, that should get me started. I suppose if I just set my log file size to a manageable number, then the old stuff will get overwritten anyway.
  • 0

#5
dsenette

dsenette

    Je suis Napoléon!

  • Administrator
  • 26,019 posts
  • MVP
right...you should be able to estimate like a week or two's worth of log size...then set your backup routine to run once every two weeks... or maybe even once a month
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP