Jump to content

How to make a faster process to update OSgrid or Your Grid in Opensimulator

From OSgrid Wiki
albertlr Landar: I decided to automate my upgrades for my var regions on Osgrid. So I set up bat files to allow me to make automatic back ups of the ini files to new instances of OSGrid.
After a lot of experimentation, I felt that using Xcopy to do this was much easier than using RoboCopy. First RoboCopy has a lot of extensions to its commands. I found that using Xcopy was much easier to use. Also when it runs in the command window, it gives you three options Yes, No and All
The All option is to copy a file with 0 bytes, or to copy all of a directory including subdirectories.  Using the Yes option allows you to confirm that the copy is successful. To make a bat file make it text first then rename it .bat

Always use a text editor like Notepad++ to open and edit it.  Double clicking on a bat file will run it in a command windows.
So here is an example of one of the bat files for one of my var regions: Your-Grid-Region-Name-Xcopy.bat:
echo on
Xcopy F:\Your-Grid-Region-Name\init\GridCommon.ini F:\Your-Grid-Region-Name\bin\config-include
Xcopy F:\Your-Grid-Region-Name\init\osslDefaultEnable.ini F:\Your-Grid-Region-Name\bin\config-include
Xcopy F:\Your-Grid-Region-Name\init\OpenSim.ini F:\Your-Grid-Region-Name\bin
Xcopy F:\Your-Grid-Region-Name\init\Regions.ini F:\Your-Grid-Region-Name\bin\Regions
Xcopy F:\Your-Grid-Region-Name\init\Robust.ini F:\Your-Grid-Region-Name\bin
Pause

Basically the process is for each ini file, to use an xcopy command to copy that ini file from its home directory to the new installation directory on your computer.
So the process is the following: xcopy "c:\directory 1\myfile" "c:\directory 2\myfile".  You do not need to use the ini file name for the destination if you want, as it will over write the old file when you click yes.  Use quotes if you have spaces in the file or directory name.
I also used the same process to set up updates for my home grids using the same structure.
So I found that this makes the process of installing a new version or Osgrid or Opensimulator much easier, and helps to avoid making mistakes in the process.
Just remember to set up a directory called Init or something like that and put all your ini files in it for future updates. Also review your ini files occasionally for any changes you may need to make after each update.