Skip to content

Upgrading file system approach

mhogeweg edited this page Dec 27, 2012 · 3 revisions

Table of Contents

Introduction

The purpose of this document is to outline one method of upgrading a geoportal server deployment with the goal of retaining all user configurations and modifications. Using SVN is preferred - see Upgrading - SVN approach. However, many people may not have started with SVN for version control. For those people, the following method should work using a more manual method for documenting user changes made to a geoportal. This is a necessary step so that you can prepare for incorporating user customizations into a new Geoportal upgrade. This document is divided into two main sections:

  • Step A: Separating and Archiving User Changes from the Base Geoportal
  • Step B: Merging User Changes from a Previous Configuration into a New Geoportal Release

Step A: Separating and Archiving User Changes from the Base Geoportal

Recommended preparation: Copy the geoportal.xml file from the /conf/Catalina/localhost folder to /webapps/geoportal/META-INF folder. Rename the geoportal.xml file to context.xml. (Why do this? First, it saves your JDBC connection information. Secondly, if you repackage your geoportal installation as a war file and include a context.xml file in the META-INF folder, the geoportal.xml file will automatically get created from the context.xml file when you redeploy the .war file)

Procedure to Separate the User Changes

Step 1. Create a directory to save the user changed files

(Why? You need a place to store the user changes)
example: C:\geoportalServer\myGeoportalConfig
Step 2. Go to the \webapps\geoportal folder and inspect the folder modified dates. Make a note of the folder dates (they should all be the same).
(Why? We want to identify a date that separates the base geoportal installation files from the files that have been added or modified by the user)
Example: date to note is 5/18/2011
Step 3. Open command window in the \webapps\geoportal folder
example:
Step 4. Run an xcopy command to copy files newer than the date you identified in Step 2. The pattern of the xcopy command will be: xcopy
 <destination></destination> /D:<mm-dd-yyyy></mm-dd-yyyy> /S
where 








    •  will typically be *.*
    • <destination></destination> is the directory path location you created in Step 1
    • /D: is a directive to specify copying files changed on or after the input date
    • <mm-dd-yyyy></mm-dd-yyyy> is the input date cutoff between original geoportal files and user modified/added files. Add one (1) day to the date identified in Step 2
    • /S is a directive to copy subdirectories (except empty ones)
Example: xcopy *.* <destination></destination> /D:05-19-2011 /S
Step 5. Check that the files you expect to be copied were transferred to the directory you created in Step 1.
Example:

End Result:

You should have an archive of all of your deployed geoportal user configuration and user modifications.

Step B: Merging User Changes from a Previous Configuration into a New Geoportal Release

Purpose: Upgrade an existing geoportal deployment to a new geoportal server release.

Prerequisite: Successfully completing the steps in 'Separating and Archiving User Changes from the Base Geoportal' specified above.

Procedure:

Step 1. Download a new Geoportal Server release from https://sourceforge.net/projects/geoportal/files/ to a working directory

Example: c:\ArcGIS\geoportalServer\newRelease
Step 2. Unzip the release and locate the geoportal.war file
Example: C:\geoportalServer\newRelease\geoportal-1.1\Web Applications\Geoportal\geoportal.war
Step 3. Make a copy of geoportal.war and rename it as geoportal.zip
Example:
Step 4. Unzip geoportal.zip
Example:
Step 5. Go back to the directory where your geoportal user changes are stored
example: C:\geoportalServer\myGeoportalConfig
Step 6. Sequentially go through each file in each subdirectory of your saved geoportal user changes and either:
  1. Copy the file to the newRelease geoportal folder (created from unzipping the geoportal.war file), if the file does not exist there already
  2. Open the old user file from myGeoportalConfig and the new file from the newRelease and Merge changes from old to new on a line by line basis, if the file exists in both locations
Sidebar Note: Notepad++ can be used to compare and merge changes between two files:
    • Copy any desired changes from the old myGeoportalConfig to the new newRelease version of the file.
    • Save changes in the newRelease version of the file.
Step 7. Select all the files inside the newRelease version of the geoportal folder.
example: all files inside C:\geoportalServer\newRelease\geoportal-1.1\Web Applications\Geoportal\geoportal
Step 8. Zip all the file contents to geoportal.zip
Example:
Step 9. Rename geoportal.zip as geoportal.war

Step 10. Deploy this geoportal.war file to Tomcat (after first undeploying and deleting the old geoportal deployment folders and war file.

End Result:

You should have a geoportal webapp deployed that contains all of your user-configured settings and modifications from the former installation while the underlying geoportal software has been upgraded to the newer release.

Clone this wiki locally