== Migrate the repository from a 1.x to a 2.0 server == The repository needs to be migrated because of the [wiki:MapGuideRfc23 Oracle Berkeley DB XML upgrade]. Here are the steps on how to migrate your data from MGOS 1.2 to MGOS 2.0 (note that these steps could take a long time if you have large repositories): 1. Shut down the existing MG Server (MGOS 1.2) if it is running. 2. Change to the !RepositoryAdmin directory (e.g. "C:\Program Files\!MapGuideOpenSource\Server\!RepositoryAdmin" on Windows). 3. Run !BackUpOnlineRepositories.bat (or !BackUpOnlineRepositories.sh for Linux). '''Important: ensure that you do not use !BackUpOfflineRepositories.bat/sh here otherwise the next step will fail.''' 4. Run !RestoreRepositories.bat (or !RestoreRepositories.sh for Linux). Check the output to make sure there are no errors. 5. Windows: uninstall the 1.2 server (note that this does not delete the existing repositories). Or stop the server and try out the [wiki:InstallSideBySide1.2and2.0Apache instructions for a side-by-side install]. 6. Install the new MGOS 2.0 Server. Note that the server will fail to start if it tries to open old repositories. 7. Shut down the newly installed MG Server (MGOS 2.0) if it is running. 8. '''Note that this step will delete any existing data from the MGOS 2.0 server.''' Delete the repositories (e.g "C:\Program Files\!MapGuideOpenSource2.0\Server\Repositories" on Windows), then copy the 1.2 repositories over to your new install (e.g. from "C:\Program Files\!MapGuideOpenSource\Server\Repositories" to "C:\Program Files\!MapGuideOpenSource2.0\Server\Repositories" on Windows). 9. Change to the !RepositoryAdmin directory (e.g. "C:\Program Files\!MapGuideOpenSource2.0\Server\!RepositoryAdmin" on Windows). 10. Run !UpgradeRepositories.bat (or !UpgradeRepositories.sh for Linux). 11. Run !SetupRepositoryIndices.bat (or !SetupRepositoryIndices.sh for Linux). 12. Start your 2.0 server. '''note:''' Some users are finding that the upgrade process removes the !DataFiles directory from their session repository. After upgrading, ensure that this folder exists, and if it does not, create it (default location for Windows shown): {{{ C:\Program Files\MapGuideOpenSource2.0\Server\Repositories\Session\DataFiles }}}