In GeoServer 2.0 the on disk storage structure for the data directory has changed. When 2.0 is started for the first time on a 1.x style data directory it will automatically convert.
The structure of a 2.0 data directory is documented here.
Back up your existing data directory.
It is important that you do this. Not only is this best practice for any minor upgrade, it is crucial for a major upgrade.
- Describe the problem on the users list.
- File a bug in the bug tracker if appropriate to do so after following step 1.
If the case where you encounter problems with the upgrade and wish to return you should be able to simply restore your backed up data directory and be fine. In the case you did not back up your data direcetory (shame on you) restoring the old data directory structure is possible by following the steps:
- Change directory to the root of the data directory to restore
- Rename catalog.xml.old to catalog.xml
- Rename services.xml.old to services.xml
- Remove the workspaces directory
At this point the old structure is restored. If you wish to clean all the 2.x style files perform the additional steps:
- Remove the layergroups directory
- Remove the files global.xml, logging.xml, wcs.xml, wms.xml, wfs.xml
- Remove all .xml files from styles Ensure that you don't remove files which contain actual SLD.
The following bash script will restore a 2.x data directory to a 1.x data directory.
- Download the restore script.
- Change directory to the data directory to restore.
- Execute the script: