![]() MyDrive - The local drive on the machine where the script is being run, so the we can later make sure we are running from the appropriate workspace.For example, if you want to archive C:\Logs on the remote machine, you would set this value to c$\logs. This can be a sharename\path, or you can (like I do) use the admin share. PathToArchive - This is the path on the target machine where the files live you want to archive.This can be a UNC path (\\MyServer\MyShare) or a drive\path (L:\MyArchive). Repository - Where we are going to send the final product.We are setting up the run with some default values, such as: It makes use of Robocopy and WinRAR to first move the files to a local temp/working directory, create a date-stamped RAR file, which then gets moved to a central repository for later disposition. It's pretty straightforward, and I think I've commented it pretty liberally. Sounds like a prime candidate for automation. Initially, this process could take me up to an hour to accomplish each day since I am working with a farm of ~30 servers. They live in the repository for 30 days, then are removed. ![]() So I've developed a process wherein the various log files are gathered from each server, compressed, and moved to a central storage repository. In any event, since I am a paranoid person I don't like to throw things like this away until I am sure they are not needed. All they do is take up space, and make the production of process necessary. Only in debug mode should these log files be generated. Here is how I automated the process.įirst, in my humble opinion, unless a debug mode switch has been thrown, these logs should be going to the Windows application event log. However, I still need to clean up those log files. ![]() ![]() All these boxes have local logging, which is picked up by Splunk. In my day job, one of the things I do is maintenance of a farm of servers. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |