SFTP Gateway 3.x Migration Guide from Version 2.x
SFTP Gateway 3.x adds a number of improvements such as:
- The ability to read and write directly to S3
- Folder management to allow multiple users to read and write to the same location.
If you are an existing SFTP Gateway customer running version 2.x, you can migrate your users and settings to a new SFTP Gateway 3.x stack.
You can also migrate from one 3.x stack to another. Use this to upgrade a single instance to high availability architecture. Or quickly spin up your setup in a different region as a cold failover.
This involves 3 main steps:
- Run an export script to generate a YAML file
- Transfer the YAML file to the new server
- Import the YAML file into the web admin UI
Export existing users
SSH into your SFTP Gateway 2.x VM, and run the following commands:
cd /home/ec2-user/
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/ec2-user/
) so that you can download the file to your local machine.
cd /opt/sftpgw/backups/
cp -a sftpgw-*.tar.gz /home/ec2-user/
cd /home/ec2-user/
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. ec2-user
) 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: