...
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
. Depending on how you installed ColllectionSpace, these might be in/home/cspace/collectionspace-source
, or 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 either
/usr/local/share/apache-tomcat-{version}
, or/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 67.10.
Before continuing, ensure that tomcat is not running.
Upgrading from CollectionSpace
...
7.
...
0
Tomcat
The tomcat server remains the same for v7.01. No upgrade is needed.
Upgrade Source Code
Perform the following steps as the user you use to build and deploy CollectionSpace – typically, either cspace
or collectionspace
.
CollectionSpace source code is normally located in /home/cspace/collectionspace-source
or /opt/collectionspace
.
If you created a tenant on your system using the clone-tenant
tool, you will have edited the tenant.properties
files in the services
and application
source code directories. These changes will prevent some the next steps form working. Usually, there's no need to retain the changed tenant.properties
files after the tenant has been created, so you can remove your changes:
Code Block | ||
---|---|---|
| ||
cd /home/cspace/collectionspace-source # or cd /opt/collectionspace
cd services
git checkout tenant.properties
cd ../application
git checkout tenant.properties |
Upgrade the source code to 7.01:
Code Block | ||
---|---|---|
| ||
cd /home/cspace/collectionspace-source # or cd /opt/collectionspace cd services git fetch git checkout v7.01-branch cd ../application git fetch git checkout v7.01-branch |
Upgrade Tenant Back End (Services) Configuration
If you created a tenant in 67.10, 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 {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 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 tenant's short name is mytenant
, and it was created from the anthro
tenant:
Code Block | ||
---|---|---|
| ||
cd /home/cspace/collectionspace-source # or cd /opt/collectionspace
cd application/tomcat-main/src/main/resources/tenants
ls anthro
> anthro-authority-concept.xml anthro-collectionobject.xml settings.xml
> anthro-authority-person-termList.xml domain-instance-vocabularies.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 67.1 0 and 7.01. 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 /home/cspace/collectionspace-source # or cd /opt/collectionspace cd application git diff -w v6origin/v7.10-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 3de573ad52f1cfa1f6..2f1cfa1f68736929ca 100644 --- a/tomcat-main/src/main/resources/anthro-tenant.xml +++ b/tomcat-main/src/main/resources/anthro-tenant.xml @@ -1144,7 +1144,7 @@ <records> <enum-blank>Please select a value</enum-blank> - <include src="base-collectionobject.xml,extensions/annotation-collectionobject.xml,extensions/culturalcare-collectionobject.xml,extensions/nagpra-collectionobject.xml,extensions/naturalhistory-collectionobject.xml,anthro-collectionobject.xml" merge="xmlmerge.propertiesauthority-citation-termList.xml" /> + <include src="base-collectionobject.xml,extensions/culturalcare-collectionobject.xml,extensions/nagpra-collectionobject.xml,extensions/naturalhistory-collectionobject.xml,anthro-collectionobject.xml" merge="xmlmerge.propertiesauthority-citation.xml" /> <include src="base-authority-place-termList.xml" /> - <include src="base-procedureauthority-acquisitionplace.xml" /> @@ -21,10 +21,12 @@ <include src="base-procedureauthority-osteologyplace.xml,extensions/anthropologynagpra-procedureauthority-osteologyplace.xml" merge="xmlmerge.properties"/> <include src="base-procedure-exhibition.xml" /> <include src="base-procedure-groups.xml" /> + <include src="base-procedure-insurance.xml" /> <include src="base-procedure-intakeauthority-taxon-termList.xml" /> <include src="base-procedureauthority-loanintaxon.xml" /> <include src="base-procedure-loanout.xml" /> <include src="base-procedure-media.xml" /> + <include src="base-procedure-transport.xml" /> <include src="base-procedure-valuationcontrol.xml" /> <include src="base-procedure-movement.xml" /> <include src="base-procedure-objectexit.xml" /> |
...
This shows that one change was made to the configuration for the template tenant (in this example, the anthro
tenant) from 67.1 0 to 7.01: One An include
line was changed, and two were added. Make the same changes 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.
...
If you created a tenant in 67.10, 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 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:
Code Block | ||
---|---|---|
| ||
cd /home/cspace/collectionspace-source # or cd /opt/collectionspace cd services/cspace-ui cp anthro/build.properties mytenant |
...
Build and deploy CollectionSpace from the source code. The final ant
command below includes the create_db
target. This will not delete any existing data, because the -Drecreate_db=true
parameter is not supplied.
Code Block | ||
---|---|---|
| ||
cd /home/cspace/collectionspace-source # or cd /opt/collectionspace
cd services
mvn clean install -DskipTests
cd ../application
mvn clean install -DskipTests
cd ../services
ant undeploy deploy create_db import |
...