SFTP Gateway Azure Migration Guide
Note: This page applies to SFTP Gateway version 2.x. Visit Here for documentation on version 3.x.
This is a guide for migrating from SFTP Gateway version
There is no in-place upgrade path between these two versions. This is because
uses a different operating system (CentOS 7).
Instead, you will need to launch a new SFTP Gateway for Azure instance and migrate your old instance over. This involves 3 main steps:
- Launch a new SFTP Gateway for Azure instance
- Run a backup script to generate an artifact
- Transfer this artifact to the new VM and run a script to restore settings from the artifact
Launch a new SFTP Gateway for Azure instance
The first step is to spin up a new SFTP Gateway for Azure instance. Click here to visit the product page on the Azure Marketplace and follow the steps there to launch a new instance. Then follow the steps below to continue.
Run a backup script to generate an artifact
SSH to the
2.000.02.azuserver as the administrator user (e.g.
sudo apt install -y python-pip
Install script dependencies
pip install pyyaml requests
Download the backup script
cd /home/ubuntu/ wget http://www.sftpgateway.com/backup-and-recovery/backup.py
Run the backup script
sudo su python backup.py
Locate the backup artifact
cd /opt/sftpgw/backups/ ls -la
Look for a backup file in the format
This will later be used to recover SFTP Gateway users and configuration.
Move this backup artifact to your home directory
cp -a /opt/sftpgw/backups/sftpgw-*.tar.gz /home/ubuntu/
In a different terminal session, copy this file to your local machine
scp -i <private-key> ubuntu@<ip-address>:/home/ubuntu/sftpgw-*.tar.gz .
Transfer this artifact to the new VM and run a script to restore settings from the artifact
To import SFTP Gateway users and configuration:
Upload the backup artifact to the new server
scp -i <private-key> sftpgw-*.tar.gz centos@<ip-address>:/home/centos/
SSH to the server as the administrator user
ssh -i <private-key> centos@<ip-address>
Download the recovery script:
Run the python recovery script
sudo python recovery.py sftpgw-YYYY-MM-DD-HH-MM-SS.tar.gz
Your new instance will be in the same state as the original instance, including your users and SFTP Gateway configuration.