Skip to main content

Jama Connect User Guide

Restore tenant assets from TAR in KOTS

Follow this process when you have an existing cluster and want to save your tenant assets on an external storage device.

Requirements
  • In EFS, the tenant assets must be backed up in a TAR file and restored once EFS has been configured.

  • Make sure that you use our process to create the TAR file; the restore commands expect a TAR file with a certain structure.

To restore tenant assets:

  1. Set an environment variable with your tenant name:

    export TENANT_NAME=jama
  2. Copy the TAR file from its current location to a master node:

    scp assets.tar.gz <user>@<ip-master-node>:~/assets.tar.gz
  3. Log in to the master node and extract the TAR file:

    tar -xvzf assets.tar.gz
  4. Copy the assets to a core pod:

    cd assets
    kubectl cp -c core . default/core-0:/home/contour/tenant/${TENANT_NAME}/
    kubectl exec --tty -c core pods/core-0 -- chmod -R 755 /home/contour
    kubectl exec --tty -c core pods/core-0 -- chown -R tomcat:tomcat /home/contour
  5. Verify that the assets were copied:

    kubectl exec --tty -c core pods/core-0 -- ls -la /home/contour/tenant/${TENANT_NAME}/
    kubectl exec --tty -c core pods/core-0 -- du -shc /home/contour/tenant/${TENANT_NAME}/