Backing up data

It is important to occasionally back up IBM® Maximo® Visual Inspection data. Different strategies exist for managing backups.

Overview

All Maximo Visual Inspection data is stored in a persistent volume claim. This persistent volume claim can exist in any directory that is accessible by all worker nodes. The claim contains the following two directories:

  • data
    • This directory contains a subdirectory for each user that includes the data sets, dnn-sources (that is, imported custom models), and trained models that the user created.
  • run
    • This directory contains runtime information for usage metrics, user registry, and metadata for the data sets.
Note: Starting in Maximo Visual Inspection 8.7, custom models are not supported. Custom models are still supported in Maximo Visual Inspection 8.6 and earlier versions.

Backup strategies

Provisioner-managed backup

Storage systems, such as IBM Spectrum® Scale, can include built-in backups or snapshot support for persistent volumes in Red Hat® OpenShift®. Since all data is written to files in a persistent volume claim, these storage subsystems can perform backups out-of-band of the application.

Manual backup of persistent volume claims

All data, including internal data, is written to files in the persistent volume claim that is associated with an instance of Maximo Visual Inspection. To manually back up the critical application data, create a backup of the persistent volume claim by performing the following steps:

  1. Mount the persistent volume claim that is used by Maximo Visual Inspection by using your preferred method.
  2. Create a backup of the data volume by using your preferred method, for example, archiving the mounted data so that you can restore it later:
    $ cd /mnt/pvcs/visualinspection-instance; tar -zpcf vision-backup.tgz ./run ./data
Online backup by using REST API

Alternatively, to protect your data while Maximo Visual Inspection is running, you can download each data set and model manually. Note: If the data sets and models are imported back into the application later, their unique user IDs (UUIDs) will change.

Backup by using Red Hat OpenShift pods

Red Hat OpenShift offers you the ability to select different backup strategies for different internal components of Maximo Visual Inspection. For example, databases can be treated differently from file system data. The following backup options are available:

  • data
    • Copy and compress these database files.
  • mongodb
    • Create a pod to dump or mirror the internal MongoDB database for Maximo Visual Inspection.

Refer to the Red Hat OpenShift blog on backing up persistent volume data for more details.

Restoring Maximo Visual Inspection data from a backup

To restore Maximo Visual Inspection data from a backup, perform the following steps:

  1. Stop Maximo Visual Inspection. Maximo Visual Inspection data cannot be restored while the application is running.
  2. Optional: Back up the current volume directories in case any issues arise.
  3. Restore Maximo Visual Inspection by populating the data and run directories in a new persistent volume claim.
  4. Redeploy Maximo Visual Inspection by using the new persistent volume claim. Maximo Visual Inspection starts its internal components and uses internal data and databases from the restored backup.

Example of mounting, backing up, and restoring configuration and runtime data

  1. Optional: To preserve data integrity, stop the vision-service pod by performing the following steps:
    • a. Using the Red Hat OpenShift administration console, scale the operator pod for the mas-visualinspection deployment to 0.
    • b. Using the Red Hat OpenShift administration console, scale the operator pod for the vision-service deployment to 0.
  2. Mount the persistent volume claim.
  3. Create a backup file that contains the mounted configuration and runtime data, and archive the file so that you can restore the data later, for example:
    $ cd /mnt/pvcs/visualinspection-instance; tar -zpcf visualinspection.tgz ./run ./data
  4. Use the archive file to restore the configuration and runtime data that you backed up, for example:
     $ cd /mnt/pvcs/visualinspection-instance; tar -zxf visualinspection.tgz
  5. Using the Red Hat OpenShift administration console, scale the operator pod for the mas-visualinspection deployment to 1. This action restarts the vision-service deployment to bring the application online.