Thanks
Automatic Backup of Event Logs
Started by
jdstockman
, Apr 13 2006 11:32 AM
#1
Posted 13 April 2006 - 11:32 AM
Thanks
#2
Posted 13 April 2006 - 11:41 AM
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..
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..
#3
Posted 13 April 2006 - 12:02 PM
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...
#4
Posted 13 April 2006 - 04:35 PM
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.
#5
Posted 14 April 2006 - 06:31 AM
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
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users