There's a time where you need to migrated existing App Gateway to another host or system because of some circumstances.
This article will guide you on how to migrate the App Gateway system.
- As App Gateway only can run in Linux, please ensure your new host is using Linux Operating System (recommended to use Ubuntu 20.04)
- Ensure in your new host you already installed the latest Docker Engine for server
- Details can be found in official documentation https://docs.docker.com/engine/install/
- Ensure in your new host you already installed the latest Docker Compose
- Details can be found in official documentation https://docs.docker.com/compose/install/
- Ensure your new host has been configured with international standard NTP to synchronize the clock. This can be achievable using several methods and packages, which each customer has their own preferred way.
- Ensure your App Gateway system in old host has been stopped
- Stopping the App Gateway system
docker-compose -f /etc/cyolo/config/docker-compose.yml down
docker-compose -f /etc/safous/user-portal/docker-compose.yml down - Check no container of App Gateway system still running
docker ps -a
- Stopping the App Gateway system
- Check the web access to user portal by opening your tenant, e.g https://login.<tenant>.ztna.safous.com . If the user portal cannot be reach, then it means previous command is correctly done
- On old host that has App Gateway system, you need to back up these directory
- /etc/cyolo -- Please run this command
tar -zcvf <BACKUP_FILE_NAME>.tar.gz -C /etc cyolo - /etc/safous -- Please run this command
tar -zcvf <BACKUP_FILE_NAME>.tar.gz -C /etc safous - /blobs -- Please run this command
tar -zcvf <BACKUP_FILE_NAME>.tar.gz /blobs
- /etc/cyolo -- Please run this command
- Copy all backup files from old host to new host by using these commands
scp <BACKUP_FILE_NAME>.tar.gz <USERNAME>@<NEW_HOST_IP>:<DEST_PATH> - Once all backup files has been copy from old host to new one, then you need to uncompressed all backup files and put it in intended directory path same as the old host
- /etc/cyolo -- Please run this command
tar -zxvf <BACKUP_FILE_NAME>.tar.gz -C /etc/ - /etc/safous -- Please run this command
tar -zxvf <BACKUP_FILE_NAME>.tar.gz -C /etc/ - /blobs -- Please run this command
tar -zxvf <BACKUP_FILE_NAME>.tar.gz -C /
- /etc/cyolo -- Please run this command
- Run these commands to run App Gateway system in the new host
docker-compose -f /etc/cyolo/config/docker-compose.yml up -d
docker-compose -f /etc/safous/user-portal/docker-compose.yml up -d - Check the App Gateway container has run properly
docker ps -a - Wait for 5-10 minutes, then check the web access to user portal by opening your tenant, e.g https://login.<tenant>.ztna.safous.com . You should be able to access again the user portal and login normally
- Lastly, now you can entirely decommission the old host