Uploading persistent volume claim data

If you are not using Cloud Object Storage, you can upload the persistent volume claim data from your local workstation to the service pod. The upload speed depends on the speed and status of the network that your workstation is using.

Before you begin

Get the VI user and group ID.
oc get deployment ${MAS_INSTANCE_ID}-service -n mas-${MAS_INSTANCE_ID}-visualinspection -o yaml | yq .spec.template.spec.securityContext.runAsUser

Procedure

  1. Get the Maximo® Visual Inspection service pod name. Run the restore data commands in this pod.
    POD_NAME=$(oc get pod -n mas-${MAS_INSTANCE_ID}-visualinspection | grep ${MAS_INSTANCE_ID}-service | awk '{print $1}')
  2. Upload the backup file to the pod.
    oc cp --retries=-1 -c ${MAS_INSTANCE_ID}-service /tmp/data.tar mas-${MAS_INSTANCE_ID}-visualinspection/${POD_NAME}:/tmp/data.tar
  3. Extract the backup file in the pod.
    oc exec ${POD_NAME} -c ${MAS_INSTANCE_ID}-service -n mas-${MAS_INSTANCE_ID}-visualinspection -- bash -c "rm -rf /opt/powerai-vision/data/*; tar -xf /tmp/data.tar -C /opt/powerai-vision/data; chown -R ${VI_USER}:${VI_USER} /opt/powerai-vision/data"