...
Databases - Use pg_dump to create archives of all postgres databases, and store the archives in a safe location.
Source code - Back up the CollectionSpace source code directories on your server. These directories are named
services
andapplication
. These are typically in/opt/collectionspace
. These directories need to be backed up because you may have made configuration changes there – for example, to create tenants.Tomcat - Back up the tomcat directory on your server. Tomcat is typically located at
/opt/collectionspace/apache-tomcat-{version}
. Substitute{version}
with the number that exists on your server. This will vary with the CollectionSpace version – for example,8.5.51
for CollectionSpace 7.12.
Before continuing, ensure that tomcat is not running.
Upgrading from CollectionSpace 7.
...
2
Tomcat
The tomcat server remains the same for v7.2. An upgrade is not required. However, version of Tomcat used for v8.0 remains 8.5.51, but the CollectionSpace tomcat distribution tarball for was repackaged for v7.2, in a way that prevents some spurious (harmless) error messages from appearing in the logs when the server starts. (In 7.1, these error messages start with java.util.zip.ZipException: error in opening zip file
.) If you'd like to stop these error messages from appearing in the logs, reinstall tomcat from the v7.2 v8.0 contains a configuration change that is required for proper functioning of the system. It is recommended to reinstall tomcat from the v8.0 tarball. To do so, perform the following steps as the user you use to build and deploy CollectionSpace – typically, collectionspace
.
...
Code Block |
---|
cd /opt/collectionspace mv apache-tomcat-8.5.51 tomcat-backup |
Download and unpack the 78.2 0 tarball. This will recreate the tomcat directory.
Code Block |
---|
wget https://s3-us-west-2.amazonaws.com/cs-public-shared-files/releases/78.20/cspace-server-78.20.tar.gz tar -zxvf cspace-server-78.20.tar.gz |
Delete the tarball.
Code Block |
---|
rm cspace-server-78.20.tar.gz |
Keep the tomcat-backup
directory in case you made any changes to it that you need to transfer to the new tomcat directory. It can be deleted after your CollectionSpace system has been upgraded and fully tested.
...
Upgrade the source code to 78.20:
Code Block | ||
---|---|---|
| ||
cd /opt/collectionspace cd services git fetch git checkout v7v8.20-branch cd ../application git fetch git checkout v7v8.20-branch |
Upgrade Tenant Back End (Services) Configuration
If you created a tenant in 7.12, there will be some back end configuration for the tenant in the application
source code directory, in the directory named tomcat-main/src/main/resources/tenants/{tenant_short_name}
, where where {tenant_short_name}
is the short name of your tenant. There will also be a directory containing configuration for the tenant that you used as a template to create your tenant, at at tomcat-main/src/main/resources/tenants/{template_short_name}
. Copy all of the files from the template tenant directory to your tenant directory, except for settings.xml
. When copying, replace the template tenant's short name with your tenant's short name in each file name. For example, if your if your tenant's short name is mytenant
,and it was created from theanthro
tenant:
Code Block | ||
---|---|---|
| ||
cd /opt/collectionspace cd application/tomcat-main/src/main/resources/tenants ls anthro > anthro-authority-chronology.xml anthro-authority-person-termList.xml domain-instance-vocabularies.xml > anthro-authority-concept.xml anthro-collectionobject.xml settings.xml cp anthro/anthro-authority-chronology.xml mytenant/mytenant-authority-chronology.xml cp anthro/anthro-authority-concept.xml mytenant/mytenant-authority-concept.xml cp anthro/anthro-authority-person-termList.xml mytenant/mytenant-authority-person-termList.xml cp anthro/anthro-collectionobject.xml mytenant/mytenant-collectionobject.xml cp anthro/domain-instance-vocabularies.xml mytenant/domain-instance-vocabularies.xml |
There is additional configuration for your tenant in the file tomcat-main/src/main/resources/{tenant_short_name}-tenant.xml
. This file was based on the corresponding file for the tenant you used as a template. That file is named tomcat-main/src/main/resources/{template_short_name}-tenant.xml
. You will need to check if the configuration for the template tenant has changed between 7.1 2 and 78.20. If so, make the same changes to your tenant's configuration file. For example, if your tenant is based on the anthro
tenant, use git
to check for changes to tomcat-main/src/main/resources/anthro-tenant.xml
:
Code Block | ||
---|---|---|
| ||
cd /opt/collectionspace cd application git diff -w origin/v7.12-branch tomcat-main/src/main/resources/anthro-tenant.xml > diff --git a/tomcat-main/src/main/resources/anthro-tenant.xml b/tomcat-main/src/main/resources/anthro-tenant.xml > index 8736929ca676667f2b..676667f2bee7cb9900 100644 > --- a/tomcat-main/src/main/resources/anthro-tenant.xml > +++ b/tomcat-main/src/main/resources/anthro-tenant.xml > @@ -5380,6 +5380,87 @@ > <include src="base-authority-concept.xml,anthro-authority-concept.xml" merge="xmlmerge.propertiesother-batchoutput.xml" /> > <include src="base-authorityother-work-termListinvocationresults.xml" /> > <include src="base-authorityother-worksearchall.xml" /> > + <include src="base-authorityother-chronology-termListassociatedauthority.xml" /> > + </records> > <include src="base-authority-chronology.xml,anthro-authority-chronology.xml" merge="xmlmerge.properties" </>spec> > > <include src="base-vocabularies.xml" /> > </cspace-config> |
This shows that one change was made to the configuration for the template tenant (in this example, the anthro
tenant) from 7.1 2 to 78.20: Two One include
lines were line was added. Make the same changes change to the configuration file for your tenant (tomcat-main/src/main/resources/{tenant_short_name}-tenant.xml
). Note that the results will vary, depending on the template tenant. Some tenants may require no configuration changes, and some tenants may require multiple changes.
If you created more than one tenant, repeat the above steps for each tenant.
...
If you created a tenant in 7.12, the user interface for the tenant will be located in the services/cspace-ui
directory. Inside that directory, there will be a directory named with the with the short name of your tenant.
To upgrade your tenant, copy build.properties
from the tenant that you used as a template for creating your tenant. For example, if the short name of your tenant is mytenant
tenant, and your tenant was cloned from the anthro
tenant:
...