Migrate Portal to a Different Machine
This section describes how to migrate the API Developer Portal to a different device.
This section describes how to migrate the API Developer Portal to a different device. Follow this migration method if:
- You need to upgrade to the latest hardened image, or
- The device that the Portal is installed on does not have enough resources (CPU, RAM, disk space, and so on) and is not easily upgraded.
This method has been tested only with a single node Portal installation. Migrating a multi-node Portal using this method is not supported.
To migrate Portal to a different device:
- Stop the Portal. Backing up the Portal requires making copies of all persistent docker volumes, so stop the Portal first to ensure data consistency. You must complete this step on the source device:docker stack rm portal
- Archive the installation directory and docker volumes. The following steps assume that your portal is installed at/opt/apim-portal-220.127.116.11-final/. You must complete this step on the source device:cd /optsudo tar zcvf /tmp/apim-portal-18.104.22.168-final.backup.tar.gz apim-portal-22.214.171.124-final/sudo bash -c 'cd /var/lib/docker/volumes && tar zcvf /tmp/volumes.tar.gz portal_*'sudo chmod go+r /tmp/apim-portal-126.96.36.199-final.backup.tar.gzsudo chmod go+r /tmp/volumes.tar.gz
- Copy the full installer, installation directory archive, and docker volumes archive to the new device by running the following command:
- Extract the full installer, then the archive, and then the Docker volumes. The full installer, which contains the Docker images, must be extracted for an offline installation to function. You must complete this step on the target device:sudo tar zxvf /tmp/apim-portal-188.8.131.52-final-offline.tar.gz -C /opt/sudo tar zxvf /tmp/apim-portal-184.108.40.206-final.backup.tar.gz -C /opt/sudo tar zxvf /tmp/volumes.tar.gz -C /var/lib/docker/volumes/
- Restart Docker to recognize the newly extracted volumes by running the following command:sudo systemctl restart docker
- Start the Portal by running the following command:cd /opt/apim-portal-220.127.116.11-finalsudo ./portal.sh
- To confirm that Portal has started, run the following command and wait until all services are listed as 1/1:watch docker service ls