If you have an existing system but you are installing OpenVPMS on a new machine, you essentially go through the steps for a new install, but instead of creating a new openpms database, you restore your existing one, and then upgrade that to the new release.
First you need to use mysqldump to take a backup of the database on the old machine (see Upgrade|Preparation).
You can then follow the New Installation steps until you get to the Database Setup step.
Then, to create the OpenVPMS MySQL database, run the following in a shell prompt
> cd <OPENVPMS_HOME>/bin
> dbtool --create restore -u admin -p apasswd
NOTES:
hibernate.connection.url=jdbc:mysql://localhost:3306/openvpms
by the IP address or host name of the database server.
This MUST be done before running dbtool.
GRANT ALL PRIVILEGES ON openvpms.* TO 'openvpms'@'%' IDENTIFIED BY 'openvpms' WITH GRANT OPTION;
To improve security, the '%' can be limited to the host that Tomcat will connect from.
Having created the database, you can now use the mysql utility to restore your backup onto the new machine. This is done using the command:
> mysql -u admin -p openvpms < openvpms.sql
where admin is the name of your root user and openvpms.sql is the dump from the old machine.
You should continue with the Web Application and Open Office installation steps.
To complete the process, we need to upgrade the installation on the new machine, so we simply use the steps to Upgrade an Existing Installation. Note that if you are migrating from 1.9 or earlier, this describes the necessary database migration steps.
If the database to restore a backup to already exists, it should be dropped first.
> mysql -u admin -p
> drop schema openvpms;
Query OK, 46 rows affected (1.04 sec)
> quit