SFTP Gateway 3.0 Migration Guide
SFTP Gateway 3.0 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.0 stack.
You can also migrate from one 3.0 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 2.0 server, 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 the export script, generating a new file: sftpgw.yml
.
This YAML file contains your global settings, as well as the settings for each SFTP user.
Take a look, and make sure each setting is correct.
Note: For migrating from 1.0, run the following commands:
cd /home/ec2-user/
wget https://s3.amazonaws.com/thorntech-public-documents/sftpgateway/migration-scripts/sftpgw-export.py
sudo python sftpgw-export.py
Transfer the YAML file
Download the YAML file from the old server to your local Mac:
scp -i <private.key> ec2-user@<old server public ip>:/home/ec2-user/sftpgw.yml .
Import users into the new server
Open the web admin UI and log in.
Go to the Settings page, and import the YAML file.
Please see this video for details: