Smart Prestart WIN

Starting OpenSimulator with a little Pre-Processing

I created this Batch File to run a couple of things for me on startup and thought it would be good to share the base of it for others to be able to further better manage their systems. I like to review my OpenSim.Log when I do a Startup and as you know, that thing becomes a Monster very fast ! BTW: It's also not good to open the "Live Log" when the system is running because it can cause the console to lockup (hate file locking @ times).

'''
 * '''What this does is described in the batch file, in a nutshell:

Presets a TimeStamp for Date@HourMinute


 * Copies \bin\opensim.log or \bin\opensim.32bitLaunch.log to the backup folder structure as defined.
 * The DEFAULT is C:\OpenSim\InstanceA\BACKups\LOGS
 * Next, it renames the copied opensim.log to OSLOG_(14052009@1100).log so now it is Date@HourMinute stamped in the filename.
 * Next, it clears the \bin\opensim.log and inserts "LOG_CLEARED AT 14052009@1100" as the first line in the file.
 * WHY? Easier to track startup issues / debugging and helps reduce size of live opensim.log
 * Creates backup structure under the instance to store critical files for recovery &amp; tracking
 * Copies critical files into backup structure (*.db, *.ini, exports, regions files ini or xml)
 * OPTIONALLY BACKS UP MYSQL DB
 * Changes directory to the \BIN folder and starts OpenSim.exe

'''INSTALLATION: '''


 * Startup with a shortcut as you would with standard opensim.exe, just start this batch file instead instead of opensim.exe
 * !! Remember to set the 5 Important Variables for your paths at the top of the batch file as shown below:
 * OPTIONALLY Now Also dumps MySql DataBase SEE Header in batchfile

SET OSbackup=C:\OpenSim\InstanceA\BACKups SET OSbinSrc=C:\OpenSim\InstanceA\bin set DBUSER=root set DBPW=YOURPASSWORD set DBNAME=opensim

That's it... Nice &amp; Easy, always a clean log when you startup and a copy of the previous log stored for you to review

THE BATCHFILE Start_OS.BAT ""

Return to Automating Tasks