Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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!

  • Community Leader
  • 26,047 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!

  • Community Leader
  • 26,047 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!

  • Community Leader
  • 26,047 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