A complete step-by-step guide to migrating your AWS Lightsail instances to RamNode Cloud VPS using live data transfer.
This guide provides step-by-step instructions for migrating your infrastructure from AWS Lightsail to RamNode VPS. Whether you're moving a single instance or multiple servers, this document covers everything from pre-migration planning through post-migration verification.
RamNode offers competitive pricing, predictable billing without hidden bandwidth costs, superior network performance, and full root access without vendor lock-in. This migration typically takes 1-4 hours depending on data volume and complexity.
Important: AWS Lightsail snapshots are proprietary and locked within the AWS ecosystem. There is no direct export option to get a portable disk image (raw, qcow2, vmdk) that you could import elsewhere.
This guide focuses on live data migration using rsync and standard backup tools, which is actually faster and cleaner for most workloads since you only transfer actual data rather than empty disk space.
| Feature | AWS Lightsail | RamNode |
|---|---|---|
| Pricing Model | Bundled plans with overage fees | Transparent pricing, no overages |
| Bandwidth | Limited, excess charged at $0.09/GB | Generous allocations included |
| Root Access | Full SSH access | Full root + console access |
| Storage | SSD (bundled only) | NVMe SSD, expandable |
| Network | AWS network, variable peering | Premium transit, consistent routing |
| IPv6 | Supported | Native dual-stack included |
| Private Networking | VPC peering (complex setup) | Simple VLAN configuration |
| Support | Basic (paid tiers available) | 24/7 technical support included |
Before beginning the migration, document all resources in your AWS Lightsail account. Use the AWS CLI to generate a comprehensive inventory:
# List all Lightsail instances
aws lightsail get-instances --query 'instances[*].{Name:name,Blueprint:blueprintId,Bundle:bundleId,IP:publicIpAddress,State:state.name}' --output table
# List static IPs
aws lightsail get-static-ips --output table
# List databases
aws lightsail get-relational-databases --output table
# List load balancers
aws lightsail get-load-balancers --output table
# List snapshots
aws lightsail get-instance-snapshots --output tableSelect a RamNode VPS plan that matches or exceeds your Lightsail instance specifications. Review your current CPU, RAM, and storage usage, then choose a plan at ramnode.com that meets your requirements with room for growth.
Create a point-in-time snapshot of your Lightsail instance as a safety net:
# Create manual snapshot
aws lightsail create-instance-snapshot \
--instance-name your-instance-name \
--instance-snapshot-name pre-migration-$(date +%Y%m%d)
# Verify snapshot creation
aws lightsail get-instance-snapshot \
--instance-snapshot-name pre-migration-$(date +%Y%m%d)Create portable backups of your critical data that can be transferred to RamNode:
MySQL/MariaDB Databases:
# Full database dump with routines and triggers
mysqldump -u root -p --all-databases --routines --triggers \
--single-transaction > all_databases_$(date +%Y%m%d).sql
# Compress the backup
gzip all_databases_$(date +%Y%m%d).sqlPostgreSQL Databases:
# Full cluster dump
pg_dumpall -U postgres > postgres_full_$(date +%Y%m%d).sql
# Or individual database
pg_dump -U postgres -d database_name -F c > database_$(date +%Y%m%d).dumpWeb Application Files:
# Create compressed archive of web content
tar -czvf web_backup_$(date +%Y%m%d).tar.gz /var/www/
# Include configuration files
tar -czvf configs_$(date +%Y%m%d).tar.gz \
/etc/nginx/ /etc/apache2/ /etc/php/ /etc/letsencrypt/Connect to your new RamNode VPS and perform initial setup:
# Connect via SSH
ssh root@your-ramnode-ip
# Update system packages
apt update && apt upgrade -y # Debian/Ubuntu
dnf update -y # AlmaLinux/Rocky
# Set timezone
timedatectl set-timezone America/New_York
# Configure hostname
hostnamectl set-hostname your-hostnameReplicate your Lightsail firewall rules using iptables or firewalld:
Using UFW (Ubuntu/Debian):
ufw default deny incoming
ufw default allow outgoing
ufw allow 22/tcp # SSH
ufw allow 80/tcp # HTTP
ufw allow 443/tcp # HTTPS
ufw enableUsing firewalld (RHEL/AlmaLinux):
firewall-cmd --permanent --add-service=ssh
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reloadThe most efficient method for transferring data directly between servers:
# From Lightsail instance, push to RamNode
rsync -avzP --progress /var/www/ root@ramnode-ip:/var/www/
# Transfer with bandwidth limit (10 MB/s)
rsync -avzP --bwlimit=10000 /var/www/ root@ramnode-ip:/var/www/
# Transfer databases
rsync -avzP /path/to/backups/*.sql.gz root@ramnode-ip:/root/backups/
# Transfer configs
rsync -avzP /etc/nginx/ root@ramnode-ip:/etc/nginx/
rsync -avzP /etc/letsencrypt/ root@ramnode-ip:/etc/letsencrypt/For larger datasets, use RamNode's S3-compatible object storage as an intermediary:
# Install s3cmd on Lightsail
apt install s3cmd
# Configure with RamNode S3 credentials
s3cmd --configure
# Upload backup files
s3cmd put web_backup_*.tar.gz s3://your-bucket/migration/
s3cmd put all_databases_*.sql.gz s3://your-bucket/migration/
# Download on RamNode VPS
s3cmd get s3://your-bucket/migration/* /root/backups/For smaller files or quick transfers:
# Transfer single file
scp /path/to/backup.tar.gz root@ramnode-ip:/root/
# Transfer directory
scp -r /var/www/html root@ramnode-ip:/var/www/Install the same software packages on your RamNode VPS that were running on Lightsail:
LEMP Stack (Nginx, MySQL, PHP):
# Ubuntu/Debian
apt install nginx mariadb-server php-fpm php-mysql php-curl \
php-gd php-mbstring php-xml php-zip
# Start and enable services
systemctl enable --now nginx mariadb php8.2-fpmLAMP Stack (Apache, MySQL, PHP):
# Ubuntu/Debian
apt install apache2 mariadb-server php libapache2-mod-php \
php-mysql php-curl php-gd php-mbstring php-xml
systemctl enable --now apache2 mariadb# MySQL/MariaDB
gunzip < all_databases_*.sql.gz | mysql -u root -p
# PostgreSQL
psql -U postgres < postgres_full_*.sql
# Verify restoration
mysql -u root -p -e "SHOW DATABASES;"
psql -U postgres -c "\l"After transferring config files, update any IP addresses or paths that differ:
# Check nginx configs for old IPs
grep -r "lightsail-ip" /etc/nginx/
# Update if found
sed -i 's/old-lightsail-ip/new-ramnode-ip/g' /etc/nginx/sites-available/*
# Test configuration
nginx -t
# Reload services
systemctl reload nginxIf you transferred Let's Encrypt certificates, verify and renew:
# Install certbot if not present
apt install certbot python3-certbot-nginx
# Test renewal
certbot renew --dry-run
# Or generate new certificates after DNS cutover
certbot --nginx -d yourdomain.com -d www.yourdomain.comBefore updating DNS, reduce TTL values to minimize propagation time during cutover:
24-48 hours before migration:
yourdomain.com A 300 old-lightsail-ip ; Reduce TTL to 5 minutesAt cutover time:
yourdomain.com A 300 new-ramnode-ip ; Point to RamNode# Verify DNS propagation
dig +short yourdomain.com
dig +short AAAA yourdomain.com
# Check from multiple locations
curl -s "https://dns.google/resolve?name=yourdomain.com&type=A" | jq# Test response time
curl -o /dev/null -s -w '%{time_total}\n' https://yourdomain.com
# Load testing with Apache Bench
ab -n 1000 -c 10 https://yourdomain.com/
# Check resource utilization
htop
free -h
df -hSet up automated backups through the RamNode control panel or configure your own solution:
#!/bin/bash
# Example: Daily backup script using RamNode S3
DATE=$(date +%Y%m%d)
mysqldump -u root -p'password' --all-databases | gzip > /backups/mysql_$DATE.sql.gz
tar -czvf /backups/www_$DATE.tar.gz /var/www/
s3cmd sync /backups/ s3://your-bucket/backups/
find /backups/ -mtime +7 -delete # Keep 7 days locallyAfter confirming the migration is successful (recommended: wait 7-14 days), clean up AWS Lightsail resources to avoid ongoing charges:
# Stop Lightsail instance (keeps data, reduces cost)
aws lightsail stop-instance --instance-name your-instance-name
# After verification period - delete resources
aws lightsail delete-instance --instance-name your-instance-name
aws lightsail release-static-ip --static-ip-name your-static-ip
aws lightsail delete-instance-snapshot --instance-snapshot-name pre-migration-*| Issue | Solution |
|---|---|
| SSH connection refused | Verify firewall allows port 22; Check SSH service is running; Verify correct IP address |
| Website not loading | Check DNS propagation; Verify web server running; Check firewall ports 80/443; Review error logs |
| Database connection errors | Verify MySQL/PostgreSQL service running; Check credentials; Ensure bind-address allows connections |
| SSL certificate errors | Wait for DNS propagation; Regenerate certificates; Check certificate paths in config |
| Permission denied errors | Check file ownership (chown); Verify permissions (chmod); Check SELinux contexts if applicable |
| Slow performance | Check resource utilization; Optimize database queries; Enable caching; Review PHP-FPM settings |
RamNode offers 24/7 technical support through multiple channels:
Congratulations on successfully migrating from AWS Lightsail to RamNode! You now have full control over your infrastructure with predictable pricing and excellent support.