This section details the procedure to be used when upgrading to a new release of OpenVPMS.
The headings below are:
Having installed the new release, you may want to look at the Implementation Checklist page.
Note that in the following the directory or folder separator character is shown as /, following unix conventions. On Windows, replace / with \. e.g. given:
<OPENVPMS_HOME>/bin
change to:
<OPENVPMS_HOME>\bin
Release Notes are provided for sub-releases (e.g. 2.2.1, 2.2.2 etc). If you are upgrading to a sub-release then you should consult the release notes on the download page at https://www.openvpms.org/download
The software required to run OpenVPMS may change between releases.
Check Requirements to ensure you have the necessary software.
These instructions assume that:
1. The previous OpenVPMS installation is available in <OPENVPMS_PREV>.
e.g. on Windows:
c:\OpenVPMS\openvpms-release-2.3
2. The new installation will be located in <OPENVPMS_HOME>.
e.g. on Windows:
c:\OpenVPMS\openvpms-release-2.4
NOTE: the OpenVPMS version can be excluded from the path name, for example c:\OpenVPMS-Current Release - when upgrading you can rename this to say 'Current Release prev' . This can simplify upgrades by removing the need to change custom scripts that contain the installation path.
The previous installation should be retained until:
Starting with OpenVPMS 2.2, there is an openvpms.properties configuration file located in the <OPENVPMS_HOME>/conf directory.
This contains:
This is created or updated using:
> cd <OPENVPMS_HOME>/bin > toolbox configure
Backup be done using the mysqldump tool. e.g.:
> mysqldump -u <admin-user> -p openvpms --result-file openvpms.sql
Replace <admin-user> with a user that has administrator privileges in MySQL.
NOTE: It is good practice to ensure that the backup can be restored to a different server, prior to performing any upgrade.
See also How To - Administration - Backup.
Allow time for the database upgrade to take place. On large databases, this may take several hours.
In practices with limited windows for downtime, do a trial upgrade on a different host to estimate how long will be needed to perform the real migration.
The upgrade time may be reduced by making innodb_buffer_pool_size as large as possible for the duration of the upgrade.
Copy the MySQL JDBC driver mysql-connector-java-<x>.jar from <OPENVPMS_PREV>/lib to <OPENVPMS_HOME>/lib
Database migration can require as much disk space as the largest table in the database. As a rule of thumb, ensure there is at least as much disk free as the database currently occupies, on the disk where the database resides.
The current database size can be determined by running:
> cd <OPENVPMS_HOME>/bin > toolbox database --size openvpms 100.05 GB
If you are replicating your OpenVPMS database, you must ensure that row-based replication is used. The upgrade scripts are not compatible with statement-based replication.
If you are upgrading from OpenVPMS 1.9 or a later release, then database migration is accomplished using the toolbox utility:
> cd <OPENVPMS_HOME>/bin > toolbox database --update -u <admin-user> -p Enter value for -p (Database administrator password): 37 changes need to be applied to update the database to the latest release. WARNING: Updating the database can take a long time. See https://openvpms.org/documentation/csh/2.4/topics/installing-openvpms/up... for instructions on: . backing up the database . determining disk space requirements . speeding up the update DO NOT continue if the database is not backed up. Proceed with the update? [Y/n] Y
Replace <admin-user> with a user that has administrator privileges in MySQL.
If you are upgrading from OpenVPMS 2.3, two MySQL users are required, a read/write user (default 'openvpms'), and a read-only user (default 'openvpmsreport').
These can be configured by running:
> cd <OPENVPMS_HOME>/bin > toolbox configure > toolbox database --setup-users -u <admin-user> -p
Upgrading from a version of OpenVPMS earlier than 1.9 requires that migration scripts first be run to bring the database up to 1.9, and then you can use the toolbox utility as above.
The scripts are located in the <OPENVPMS_HOME>/legacy-migration directory. With the exception of the 1.5 to 1.6 release (where there was no change to the database structure), there is one sql script per release.
The sql scripts are:
migrate-1.0-to-1.1.sql
migrate-1.1-to-1.2.sql
migrate-1.2-to-1.3.sql
migrate-1.3-to-1.4.sql
migrate-1.4-to-1.5.sql
migrate-1.6-to-1.7.sql
migrate-1.7-to-1.8.sql
migrate-1.8-to-1.9.sql
You need to run each relevant one in turn using the mysql utility.
Hence if you are upgrading from OpenVPMS 1.8, run:
> mysql -u openvpms -p openvpms < migrate-1.8-to-1.9.sql
If you are upgrading from OpenVPMS 1.7, run:
> mysql -u openvpms -p openvpms < migrate-1.7-to-1.8.sql
> mysql -u openvpms -p openvpms < migrate-1.7-to-1.9.sql
If you are upgrading from OpenVPMS 1.5 or 1.6, run:
I > mysql -u openvpms -p openvpms < migrate-1.6-to-1.7.sql
> mysql -u openvpms -p openvpms < migrate-1.7-to-1.8.sql
> mysql -u openvpms -p openvpms < migrate-1.8-to-1.9.sql
If you are upgrading from OpenVPMS 1.0 - you need the lot, so run:
> mysql -u openvpms -p openvpms < migrate-1.0-to-1.1.sql
> mysql -u openvpms -p openvpms < migrate-1.1-to-1.2.sql
> mysql -u openvpms -p openvpms < migrate-1.2-to-1.3.sql
> mysql -u openvpms -p openvpms < migrate-1.3-to-1.4.sql
> mysql -u openvpms -p openvpms < migrate-1.4-to-1.5.sql
> mysql -u openvpms -p openvpms < migrate-1.6-to-1.7.sql
> mysql -u openvpms -p openvpms < migrate-1.7-to-1.8.sql
> mysql -u openvpms -p openvpms < migrate-1.8-to-1.9.sql
NOTE: With a large database, the 1.8 to 1.9 migration takes some time and using the -v or -v -v -v option is useful to reassure yourself that something is happening.
The web application needs to be created with the properties from <OPENVPMS_HOME>/conf/openvpms.properties.
This is done using the toolbox war command i.e.:
> cd <OPENVPMS_HOME>/bin > toolbox war Created ../webapps/openvpms.war The file ../webapps/openvpms.war should have restrictive permissions to protect passwords
The existing web application should be removed before installing the new version.
To do this:
If you use customised versions of the standard archetypes, or have added archetypes, these will need to be loaded.
For modified versions of the standard archetypes, be sure to incorporate any changes that have been made.
You should then use toolbox archetype --load to load these archetypes - or if you have only a few, use Administration|Archetypes|Import.
If you have customised versions of propercase.properties, help.properties, or messages.properties you need to install these in
<TOMCAT_HOME>/webapps/openvpms/WEB-INF/classes/localisation
You can simply overwrite the default propercase.properties with your own version.
However, help.properties and messages.properties will need to be edited to bring your adjustments into the current versions.
If you have a customised default.stylesheet, then the version in
<TOMCAT_HOME>/webapps/openvpms/WEB-INF/classes/style
will need to be edited to incorporate your changes.
Now restart Apache Tomcat so the above customisations get picked up and login and see that things are as they should be.
To take advantage of the new and revised templates, they need to be loaded.
Templates are divided into two types:
• document templates - Invoices, Receipts etc
• report templates - reports run from Reporting - Reports
It is strongly recommended that all sites run the latest versions of the standard reports.
If a site is using:
After loading, obsolete templates may need to be manually removed.
Templates can be selectively loaded:
Document and report templates can be loaded separately. This can be useful if a site has customised one and not the other.
Document templates can be loaded using:
> cd <OPENVPMS_HOME>/bin > toolbox template --load --size <size> documents
where size is one of A4, A5, or Letter.
Report templates can be loaded using:
> cd <OPENVPMS_HOME>/bin > toolbox template --load --size <size> reports
where size is one of A4, or Letter.
In both cases, these will:
To load a subset of the available templates, specify them by name e.g.:
> cd <OPENVPMS_HOME>/bin > toolbox template --load --size A4 'Invoice' 'Invoice Items' 'Invoice Items-PT' Loaded 'Invoice' Loaded 'Invoice Items' Loaded 'Invoice Items-PT'
To create a templates file that loads only the desired files, copy an existing templates xml file, and remove the lines that do not apply.
This will prevent standard templates replacing existing custom templates.
E.g., to exclude loading A4 invoices:
<!--
<template name="Invoice" archetype="act.customerAccountChargesInvoice" reportType="CUSTOMER"
description="Invoice " path="Customer/Invoice/A5/Invoice.jrxml" mimeType="text/xml"
docType="document.other"/>
<template name="Invoice Items" archetype="SUBREPORT" reportType="CUSTOMER" description="Invoice Items "
path="Customer/Invoice/A5/Invoice Items.jrxml" mimeType="text/xml" docType="document.other"/>
-->
3. load the templates
> cd <OPENVPMS_HOME>/bin > toolbox template --load --file ../reports/mydocuments.xml --all
Restart Tomcat after loading templates to ensure that its caches do not contain obsolete information.
See also Obsolete Document Templates.
Some document templates have been either renamed, had their content name changed, or are no longer used.
The following templates have been superseded in OpenVPMS 2.3. If they are unused, they can be deleted.
Name | Content | Replaced By |
---|---|---|
Desexing Certificate | Desexing Certificate.odt | Desexing Certificate.jrxml |
Prescription | Prescription.odt | Prescription.jrxml |
Referral Letter | Referral Letter.odt | Referral Letter.jrxml |
Vaccination Certificate | Vaccination Certificate.odt | Vaccination Certificate.jrxml Vaccination Certificate with reminders.jrxml |
Drug Label | Label.jrxml | Label 46x79.jrxml Label 54x70.jrxml Label 54x101.jrxml Label 56x79.jrxml |
Grouped Reminders | Grouped Reminders.jrxml | Customer Grouped Reminder.jrxml Patient Grouped Reminder.jrxml |
Reminder Cartrophen First | Reminder Cartrophen First.odt | Patient Single Reminder.jrxml |
Reminder Desexing First | Reminder Desexing First.odt | Patient Single Reminder.jrxml |
Reminder Vaccination First | Reminder Vaccination First.odt | Patient Single Reminder.jrxml |
No templates became obsolete between the 1.9 and 2.2 releases.
If you have upgraded from 1.8 and you have used the templateload utility to load the 1.9 template set, then the following templates can be deleted as they are no longer used:
Name | Content |
---|---|
Counter Sale Items | Counter Sale Items.jrxml |
Credit Items | Credit Items.jrxml |
Debtors - Current - SubReport2 | Debtors - Current - SubReport2.jrxml |
Supplier Credit Items | Supplier Credit Items.jrxml |
Pharmacy Return Items | Pharmacy Return Items.jrxml |
Refund Items | Refund Items.jrxml |
If you have upgraded from 1.7 and you used the templateload utility to load the 1.8 or 1.9 template set, then, unless you have manually deleted them, you will have obsolete 1.7 document templates in your system. The table below lists those templates that can be deleted.
NOTE:
Name | Content |
---|---|
Appointment | Appointment A5.jrxml |
Bank Deposit | Bank Deposit A4.jrxml |
Counter Sale | countersale a4.jrxml |
Counter Sale | countersale a5.jrxml |
Counter Sale Items | countersaleItems.jrxml |
Counter Sale Items | countersaleItemsA5.jrxml |
Credit | credit a4.jrxml |
Credit | credit a5.jrxml |
Credit Adjustment | Credit Adjustment A5.jrxml |
Credit Items | creditItems.jrxml |
Credit Items | creditItemsA5.jrxml |
Customer Account Balance Report | customerAccountBalance.jrxml |
Debit Adjustment | Debit Adjustment A5.jrxml |
Desexing Certificate | desexing certificate a4.odt |
Desexing Certificate | desexing certificate a5.odt |
Drug Label | label Dymo.jrxml |
Estimate | Estimate A4.jrxml |
Estimate | Estimate A5.jrxml |
Estimate Items | Estimate Items A4.jrxml |
Estimate Items | Estimate Items A5.jrxml |
Grouped Reminders Report | grouped reminders a4.jrxml |
Invoice | invoice a4.jrxml |
Invoice | invoice a5.jrxml |
Invoice Items | invoiceitems.jrxml |
Invoice Items | invoiceitemsa5.jrxml |
Invoice Reminders | invoiceRemindersA4.jrxml |
Invoice Reminders | invoiceRemindersA5.jrxml |
Message | message a4.jrxml |
Order Items | orderItems.jrxml |
Patient Clinical Event | patientClinicalEvent a4.jrxml |
Patient Clinical Event | patientClinicalEvent a5.jrxml |
Patient Image | patientDocumentImage.jrxml |
Patient Reminders Report | patientReminders.jrxml |
Receipt | receipt a4.jrxml |
Receipt | receipt a5.jrxml |
Receipt Items | receiptItems.jrxml |
Receipt Items | receiptItemsA5.jrxml |
Refund | Refund A5.jrxml |
Refund Items | Refund Items A5.jrxml |
Reminder Cartrophen First | cartrophen first reminder.odt |
Reminder Desexing First | desex first reminder.odt |
Reminder Vaccination First | vaccination first reminder.odt |
Reminder Vaccination Puppy and Kitten First | vaccination puppy kitten first reminder.odt |
Reminder Vaccination Second | vaccination second reminder.odt |
Statement | statement A4.jrxml |
Statement | statement A5.jrxml |
Statement Items | statementItems A5.jrxml |
Statement Items | statementItems.jrxml |
Stock Adjustment | Stock Adjustment A4.jrxml |
Stock Adjustment Items | Stock Adjustment Items A4.jrxml |
Stock Take List Report | stock take list.jrxml |
Stock Transfer | Stock Transfer A4.jrxml |
Stock Transfer Items | Stock Transfer Items A4.jrxml |
Supplier Credit | Supplier Credit A5.jrxml |
Supplier Credit Items | Supplier Credit Items A5.jrxml |
Supplier Invoice | Supplier Invoice A5.jrxml |
Supplier Invoice Items | Supplier Invoice Items A5.jrxml |
Supplier Refund | Supplier Refund A5.jrxml |
Supplier Refund Items | Supplier Refund Items A5.jrxml |
Supplier Remittance | Supplier Remittance A5.jrxml |
Supplier Remittance Items | Supplier Remittance Items A5.jrxml |
Task | Task A5.jrxml |
Till Balance | TillBalance.jrxml |
Vaccination Certificate | vaccination certificate a4.odt |
Vaccination Certificate | vaccination certificate a5.odt |
Work In Progress Report | workInProgress.jrxml |