Migration Guide
Overview
This article shows you how to migrate from SFTP Gateway 2.x to 3.x. There is no direct upgrade path. Rather, you need to migrate between servers.
To migrate, you will perform the following steps:
- Export users and settings from SFTP Gateway 2.x to a backup artifact
- Transfer this backup artifact to your local machine
- Upload this backup artifact to a new SFTP Gateway 3.x VM
Export users and settings to a backup artifact
SSH into your SFTP Gateway 2.x VM, and run the following commands:
cd /home/azureuser/
wget http://www.sftpgateway.com/backup-and-recovery/backup.py
sudo python backup.py
This downloads and runs a Python script that gathers the users and settings of SFTP Gateway.
The script generates a backup artifact named sftpgw.yml
in the folder: /opt/sftpgw/backups/
.
Copying the file
Copy the backup artifact to your home directory (e.g. /home/azureuser/
) so that you can download the file to your local machine.
cd /opt/sftpgw/backups/
cp -a sftpgw-*.tar.gz /home/azureuser/
cd /home/azureuser/
ll
tar xzvpf <file-name>
Now that the backup artifact is in your Linux home directory,
log in with your Linux admin user (e.g. azureuser
) via SFTP (using FileZilla or WinSCP)
and download the backup artifact.
Importing the file into SFTP Gateway v3
To import the backup artifact, open the web admin portal on your SFTP Gateway v3 instance.
Go to the Settings page.
Toward the bottom, you can upload the .yml
file.
You should see a status of which SFTP users were imported.
Video Example
Refer to this video, which goes through the migration process:
Replicating Folder paths
In Version 3.x, the default folder paths for users are different than in Version 2.x.
Version 3.x default path: /users/{username}
Version 2.x default path: /{username}/uploads
In order to replicate the same folder path you had in verison 2.x (/{username}/uploads), you would edit the /users folder so that it's Cloud Connection is changed from inherited
to the default Cloud Connection. That way, your users will have the same folder path when they connect to the server as they did in version 2.x and in Blob Storage.