In order to move the database to an infrastructure server, the following process must be followed:
## Stopping Opsview
You will need to stop Opsview Monitor to achieve a consistent snapshot of the database and, as such, in the example below, we show you how to stop Opsview Monitor.
Stop Opsview for a consistent snapshot of the database.
## Backup Your Databases
Here, we assume that you are undertaking a full database export. You may, of course, use any other application to back up your MySQL databases. You should be aware that if the new database server is located on a different architecture, that is, 32- or 64-bit, then you will need to export your database, as shown in the example below:
Run the below command as root making sure to include any extra databases you may have (for example, include jasperserver if it exists). This will create a full database export:
## Backup Access Control
You should also set up access controls with your new database server so that the Opsview Monitor master is allowed to connect. So, from the Opsview Monitor master run the command shown below:
Set up access controls to allow the Opsview Monitor master to connect.
If you are migrating the jasperserver database that is used for the reporting module then export the database access controls.
## Update the deployment configuration file
Add the database configuration to opsview_deploy.yml
/opt/opsview/deploy/etc`, update the opsview_deploy.yaml
If you use a different administration user user than `
root` for the database, you can specify that using
which should be underneath and indented to line up with the `
#### For system upgraded from Opsview Monitor 5.4.2
/opt/opsview/deploy/etc`, comment out the following from user_upgrade_vars.yml
## Run the following commands:
## Restore Your Databases
On your new server, restore the databases, as shown in the example below. You should also verify that your character set for the new databases are the same, as your previous version, since you may experience issues when upgrading.
On your new server restore your databases.
## Restore Access Control
The file, opsview_access.sql now contains all the necessary access credentials, which should be transferred to the new database and imported as follows:
If migrating the reporting jasperserver database
For additional security, you may want to restrict access to the Opsview Monitor master only.