Back to Cloud VPS Documentation

    Migrate from AWS Lightsail to RamNode

    A complete step-by-step guide to migrating your AWS Lightsail instances to RamNode Cloud VPS using live data transfer.

    Introduction

    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.

    Why Not Use Lightsail Snapshots?

    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.

    Platform Comparison

    FeatureAWS LightsailRamNode
    Pricing ModelBundled plans with overage feesTransparent pricing, no overages
    BandwidthLimited, excess charged at $0.09/GBGenerous allocations included
    Root AccessFull SSH accessFull root + console access
    StorageSSD (bundled only)NVMe SSD, expandable
    NetworkAWS network, variable peeringPremium transit, consistent routing
    IPv6SupportedNative dual-stack included
    Private NetworkingVPC peering (complex setup)Simple VLAN configuration
    SupportBasic (paid tiers available)24/7 technical support included

    1Pre-Migration Planning

    Inventory Your Lightsail Resources

    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 table

    Pre-Migration Checklist

    • Document all running services and their configurations
    • Note current resource utilization (CPU, RAM, disk, bandwidth)
    • Export DNS zone files from Lightsail DNS or Route 53
    • Identify SSL certificates and renewal dates
    • List all cron jobs and scheduled tasks
    • Document firewall rules from Lightsail networking tab
    • Backup all databases with full exports
    • Create Lightsail snapshots as fallback
    • Estimate total data transfer size
    • Plan maintenance window and notify stakeholders

    Choose Your RamNode Plan

    Select 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.

    2Backup Procedures

    Create Lightsail Snapshot

    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)

    Export Application Data

    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).sql

    PostgreSQL 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).dump

    Web 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/

    3Setting Up Your RamNode VPS

    Order and Provision Your VPS

    1. Navigate to ramnode.com and select your desired VPS plan
    2. Choose your preferred data center location (NYC, ATL, SEA, LA, NL)
    3. Select your operating system (match your Lightsail blueprint for easiest migration)
    4. Complete the order and wait for provisioning (typically under 5 minutes)
    5. Access credentials will be emailed and available in the client portal

    Initial Server Configuration

    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-hostname

    Configure Firewall

    Replicate 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 enable

    Using firewalld (RHEL/AlmaLinux):

    firewall-cmd --permanent --add-service=ssh
    firewall-cmd --permanent --add-service=http
    firewall-cmd --permanent --add-service=https
    firewall-cmd --reload

    4Data Transfer Methods

    Method 1: Direct rsync Transfer (Recommended)

    The 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/

    Method 2: Using RamNode S3-Compatible Storage

    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/

    Method 3: SCP for Small Transfers

    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/

    5Service Migration

    Install Required Software Stack

    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-fpm

    LAMP 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

    Restore Databases

    # 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"

    Restore Configuration Files

    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 nginx

    SSL Certificate Migration

    If 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.com

    6DNS Cutover

    Prepare for DNS Changes

    Before 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 minutes

    At cutover time:

    yourdomain.com A 300 new-ramnode-ip ; Point to RamNode

    Update DNS Records

    1. Log into your DNS provider (or RamNode DNS if transferring)
    2. Update A records to point to your new RamNode IP
    3. Update AAAA records if using IPv6
    4. Update any MX records if mail services moved
    5. Verify propagation using dig or online tools
    # 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

    7Post-Migration Verification

    Verification Checklist

    • Website loads correctly over HTTPS
    • All pages and functionality working
    • Database connections successful
    • Email sending/receiving functional (if applicable)
    • Cron jobs running on schedule
    • SSL certificates valid and auto-renewing
    • Backups configured on RamNode
    • Monitoring and alerting in place
    • Performance metrics acceptable

    Performance Testing

    # 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 -h

    Configure RamNode Backups

    Set 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 locally

    Cleanup and Decommissioning

    After confirming the migration is successful (recommended: wait 7-14 days), clean up AWS Lightsail resources to avoid ongoing charges:

    1. Keep Lightsail instance stopped (not terminated) for 7-14 days as fallback
    2. Release static IPs if no longer needed
    3. Delete load balancers and managed databases
    4. After verification period, delete instance and snapshots
    5. Update any documentation or runbooks with new server details
    # 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-*

    Troubleshooting

    Common Issues and Solutions

    IssueSolution
    SSH connection refusedVerify firewall allows port 22; Check SSH service is running; Verify correct IP address
    Website not loadingCheck DNS propagation; Verify web server running; Check firewall ports 80/443; Review error logs
    Database connection errorsVerify MySQL/PostgreSQL service running; Check credentials; Ensure bind-address allows connections
    SSL certificate errorsWait for DNS propagation; Regenerate certificates; Check certificate paths in config
    Permission denied errorsCheck file ownership (chown); Verify permissions (chmod); Check SELinux contexts if applicable
    Slow performanceCheck resource utilization; Optimize database queries; Enable caching; Review PHP-FPM settings

    Getting Help

    RamNode offers 24/7 technical support through multiple channels:

    • Support tickets via client portal (recommended for complex issues)
    • Live chat for quick questions
    • Knowledge base at clientarea.ramnode.com/knowledgebase
    • Community forums for peer assistance

    Migration Complete!

    Congratulations on successfully migrating from AWS Lightsail to RamNode! You now have full control over your infrastructure with predictable pricing and excellent support.