๐Ÿ”ด Migration Guide

๐Ÿ”ด CloudNexus Migration Guide

A comprehensive, step-by-step guide to migrating your infrastructure to CloudNexus. Move from any provider with minimal downtime and maximum confidence.

๐Ÿ“… Last updated: Jan 15, 2025
โฑ๏ธ ~15 min read
๐Ÿท๏ธ Infrastructure

Migration Progress

Step 1 of 6
1
Assess
2
Plan
3
Prepare
4
Migrate
5
Validate
6
Cutover

๐Ÿ“‹ Migration Overview

Migrating to CloudNexus is designed to be straightforward and low-risk. Whether you're coming from AWS, Azure, GCP, or an on-premise data center, our migration tools and guided process ensure a smooth transition.

โš ๏ธ Before Migration
Current Provider Legacy infrastructure with limited scalability
Avg. Response Time 120ms โ€” 450ms (varies by region)
Monthly Cost Unpredictable billing, hidden overage fees
Support Tiered response times, limited SLA
โœ… After Migration
CloudNexus Platform Auto-scaling, 50+ global regions
Avg. Response Time 8ms โ€” 25ms (optimized routing)
Monthly Cost Transparent pricing, up to 40% savings
Support 24/7 priority, 99.999% uptime SLA
โ„น๏ธ
Free Migration Assistance
All Professional and Enterprise plans include dedicated migration engineering support. Contact our team to schedule a migration planning session.

๐Ÿ“ฆ Prerequisites

Before beginning the migration process, ensure you have the following in place:

โœ… Pre-Migration Checklist
โœ“
Active CloudNexus account with verified billing
โœ“
API keys generated with appropriate permissions
CloudNexus CLI installed and configured (v2.4.0+)
Infrastructure inventory documented (servers, databases, storage)
Backup of all current data and configurations verified
DNS provider access and TTL values noted
Maintenance window scheduled with stakeholders
Rollback plan documented and tested

Required Tools

Tool Version Purpose Required
cx-cli โ‰ฅ 2.4.0 CloudNexus command-line interface โœ… Yes
migrator โ‰ฅ 1.2.0 Data migration tool โœ… Yes
terraform โ‰ฅ 1.5.0 Infrastructure as Code (optional) โšช Optional
cx-dns-sync โ‰ฅ 1.0.0 DNS propagation monitoring โœ… Yes
rsync โ‰ฅ 3.2.0 File synchronization โšช Optional

๐Ÿ” Environment Assessment

The first step is to audit your current infrastructure. Use the CloudNexus assessment tool to generate a detailed compatibility report.

bash
# Run the assessment scanner against your current infrastructure
cx-cli assess --provider aws \
  --region us-east-1 \
  --output assessment-report.json \
  --verbose

# Generate a migration plan based on the assessment
cx-cli plan --input assessment-report.json \
  --strategy blue-green \
  --target-region cx-global \
  --output migration-plan.yaml
โš ๏ธ
Assessment Takes Time
Large environments (100+ resources) may take 15-30 minutes to fully assess. The tool works non-destructively and only reads configuration data.

What Gets Assessed

  • Compute: EC2 instances, virtual machines, container clusters, and serverless functions
  • Storage: Block storage, object storage, file systems, and backup volumes
  • Database: RDS, DynamoDB, Redis, Elasticsearch, and custom databases
  • Networking: VPCs, load balancers, DNS records, and security groups
  • Security: IAM roles, SSL certificates, WAF rules, and firewall configurations
  • Monitoring: CloudWatch, logs, alerts, and custom dashboards

๐ŸŽฏ Choose Your Migration Strategy

Select the migration strategy that best fits your application's requirements and tolerance for downtime.

A
Rehost (Lift & Shift)

Direct migration with minimal changes. Best for stateless applications and standard workloads. Fastest option.

yaml
# migration-plan.yaml โ€” Rehost Strategy
strategy: rehost
downtime: ~5-15 minutes
effort: low
steps:
  - snapshot_source
  - provision_target
  - sync_data
  - cut_over
  - verify
B
Blue-Green Deployment

Zero-downtime migration. Run both environments simultaneously and switch traffic gradually. Recommended for production.

yaml
# migration-plan.yaml โ€” Blue-Green Strategy
strategy: blue-green
downtime: zero
effort: medium
traffic-shift:
  - stage: initial
    blue: 100%
    green: 0%
  - stage: canary
    blue: 90%
    green: 10%
  - stage: full
    blue: 0%
    green: 100%
C
Phased Migration

Migrate individual services or components one at a time. Best for microservices architectures with complex dependencies.

yaml
# migration-plan.yaml โ€” Phased Strategy
strategy: phased
downtime: minimal per phase
phases:
  - name: "CDN & Static Assets"
    duration: 1 day
  - name: "Database Migration"
    duration: 3 days
  - name: "Compute Migration"
    duration: 2 days
  - name: "DNS Cutover"
    duration: 24 hours
๐Ÿšจ
Production Warning
Always test your migration strategy in a staging environment first. Never attempt a production migration without a validated rollback plan.

๐Ÿ’ป CLI & Tool Setup

Install and configure the CloudNexus CLI, which serves as your primary tool for migration orchestration.

Installation

bash โ€” macOS / Linux
# Install via curl
curl -fsSL https://cli.cloudnexus.dev/install | bash

# Or via Homebrew
brew install cloudnexus/tap/cx-cli

# Verify installation
cx-cli --version
# โ†’ cx-cli v2.4.1
bash โ€” Windows (PowerShell)
# Install via winget
winget install CloudNexus.cx-cli

# Or via Chocolatey
choco install cx-cli

# Verify installation
cx-cli --version
# โ†’ cx-cli v2.4.1

Authentication

bash
# Login with API key (recommended for CI/CD)
cx-cli auth login --api-key cnx_live_sk_abc123... \
  --org your-org-name

# Or login interactively via browser
cx-cli auth login
# โ†’ Opens browser for OAuth2 authentication

# Verify authentication
cx-cli auth whoami
# โ†’ Organization: your-org-name
# โ†’ Account: admin@yourcompany.com
# โ†’ Role: administrator
โ„น๏ธ
API Key Best Practices
Generate a dedicated migration API key with scoped permissions from your CloudNexus Dashboard. Never commit API keys to version control. Use environment variables or secret managers.

Configure Source Provider Credentials

bash
# For AWS source
cx-cli source connect --provider aws \
  --access-key-id $AWS_ACCESS_KEY_ID \
  --secret-access-key $AWS_SECRET_ACCESS_KEY \
  --region us-east-1

# For Azure source
cx-cli source connect --provider azure \
  --subscription-id your-subscription-id \
  --tenant-id your-tenant-id \
  --client-secret $AZURE_CLIENT_SECRET

# For GCP source
cx-cli source connect --provider gcp \
  --project-id your-project-id \
  --credentials-file ./service-account.json

๐Ÿ”„ Data Migration Steps

This section covers the core data migration process. Execute each step carefully and verify before proceeding.

Step 1: Initialize Migration

bash
# Create a new migration workspace
cx-cli migrate init --name prod-migration-2025 \
  --strategy blue-green \
  --source aws:us-east-1 \
  --target cx-global

# Output:
# โœ“ Migration workspace created: prod-migration-2025
# โœ“ Source connected: AWS (us-east-1)
# โœ“ Target ready: CloudNexus (global)
# โœ“ Migration ID: mig_8xK2pQ9vR

Step 2: Sync Compute Resources

bash
# Migrate virtual machines / EC2 instances
cx-cli migrate compute --migration mig_8xK2pQ9vR \
  --include "prod-web-*" \
  --include "prod-api-*" \
  --instance-type cx-4xlarge \
  --region auto \
  --dry-run

# Review the dry-run output, then execute:
cx-cli migrate compute --migration mig_8xK2pQ9vR \
  --include "prod-web-*" \
  --include "prod-api-*" \
  --instance-type cx-4xlarge \
  --region auto \
  --execute \
  --verbose

# Output:
# โŸณ Migrating prod-web-01 โ†’ cx-web-01 (us-east) ... done
# โŸณ Migrating prod-web-02 โ†’ cx-web-02 (eu-west) ... done
# โŸณ Migrating prod-api-01 โ†’ cx-api-01 (us-east) ... done
# โœ“ 3 instances migrated successfully

Step 3: Migrate Databases

bash
# Migrate PostgreSQL database with continuous sync
cx-cli migrate database --migration mig_8xK2pQ9vR \
  --source postgresql://source-host:5432/production \
  --target cx-db-01 \
  --continuous-sync \
  --parallel-jobs 8

# Monitor sync progress
cx-cli migrate status --migration mig_8xK2pQ9vR \
  --component database

# Output:
# Database Migration Progress: โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘ 82%
# Sync Lag: 1.2 seconds
# Tables: 47/47 synced
# Rows: 2.4M/2.4M migrated
โœ…
Continuous Sync Active
The continuous sync mode keeps the target database in near-real-time sync with the source. When you're ready for cutover, the lag will typically be under 5 seconds.

Step 4: Transfer Storage

bash
# Migrate S3-compatible object storage
cx-cli migrate storage --migration mig_8xK2pQ9vR \
  --source-bucket s3://my-app-assets \
  --target-bucket cx-storage-assets \
  --parallel-jobs 16 \
  --verify

# Output:
# โŸณ Transferring 847 objects (42.3 GB) ...
# โœ“ 847/847 objects transferred
# โœ“ Integrity check passed

๐ŸŒ DNS Cutover

The final step in the migration is switching your DNS records to point to CloudNexus. We recommend using our DNS sync tool for a smooth transition.

bash
# Lower TTL values before cutover (recommended: 24hrs before)
cx-dns-sync lower-ttl --domain example.com \
  --provider cloudflare \
  --ttl 60

# When ready, perform the cutover
cx-cli migrate cutover --migration mig_8xK2pQ9vR \
  --dns-provider cloudflare \
  --domain example.com \
  --ttl 60 \
  --confirm

# Monitor DNS propagation
cx-dns-sync monitor --domain example.com \
  --target-ip 203.0.113.50

# Output:
# DNS Propagation Status:
#   US-East:       โœ“ Propagated (203.0.113.50)
#   EU-West:       โœ“ Propagated (203.0.113.50)
#   AP-South:      โŸณ In progress...
#   SA-East:       โœ“ Propagated (203.0.113.50)
โš ๏ธ
DNS Propagation Window
Even with a 60s TTL, allow 5-10 minutes for global propagation. During this window, some users may still reach the old infrastructure. Ensure the old environment remains operational until propagation completes.

๐Ÿงช Validation & Testing

After cutover, run comprehensive validation tests to confirm everything is working correctly.

bash
# Run automated validation suite
cx-cli validate --migration mig_8xK2pQ9vR \
  --check connectivity \
  --check database \
  --check storage \
  --check ssl \
  --check dns \
  --report validation-report.html

# Output:
# โœ“ Connectivity: All 3 instances responding (avg 12ms)
# โœ“ Database: 47 tables verified, 2.4M rows matched
# โœ“ Storage: 847 objects verified, checksums match
# โœ“ SSL: Certificate valid, expires 2025-12-15
# โœ“ DNS: Fully propagated across all regions
#
# Migration Status: โœ… SUCCESS
# Total migration time: 2h 14m

Post-Migration Checklist

๐Ÿ“‹ Post-Migration Tasks
Verify all application endpoints are responding correctly
Confirm database queries return expected results
Test file uploads and downloads against new storage
Verify SSL certificates are valid and properly chained
Confirm monitoring and alerting are configured
Check application logs for errors or warnings
Run load test to verify performance under traffic
Update internal documentation with new endpoints

โ†ฉ๏ธ Rollback Plan

If any critical issues arise during or after migration, you can quickly roll back to your original infrastructure. Always keep your source environment running for at least 48 hours after cutover.

bash
# Execute rollback to source infrastructure
cx-cli migrate rollback --migration mig_8xK2pQ9vR \
  --dns-provider cloudflare \
  --domain example.com \
  --confirm

# Output:
# โ†ฉ Reverting DNS records to source IPs...
# โ†ฉ Updating A records for example.com
# โ†ฉ Updating CNAME records for *.example.com
# โœ“ DNS reverted successfully
#
# โš  CloudNexus resources remain active for 48 hours
# ๐Ÿ’ก You can restart the migration at any time
๐Ÿšจ
Rollback Time Window
CloudNexus resources are preserved for 48 hours after a rollback. After this period, they will be automatically terminated. If you need longer retention, contact support for an extension.

Rollback Decision Matrix

d>
Issue Severity Action Rollback?
Minor latency increase Low Optimize configuration No
Database sync lag > 30s Medium Pause traffic, investigate Consider
Application errors > 1% High Immediate rollback Yes
Data corruption detected Critical Immediate rollback Yes โ€” urgent
SSL/TLS failures High Fix or rollback Consider

โ“ Frequently Asked Questions

How long does a typical migration take?

+

For small environments (1-5 servers), migration typically takes 1-2 hours. Medium environments (10-50 servers) take 4-8 hours. Large enterprise migrations (100+ servers) may take 1-3 days depending on the strategy chosen. Database migrations with large datasets may require additional time for initial sync.

Will there be downtime during migration?

+

With the blue-green or phased migration strategy, downtime can be reduced to zero. The rehost strategy may require a brief maintenance window of 5-15 minutes for DNS cutover. We recommend using blue-green for production environments.

Can I migrate from multiple cloud providers at once?

+

Yes! The migration tool supports multi-source setups. You can configure multiple source providers (AWS, Azure, GCP, on-premise) and consolidate everything into a single CloudNexus migration. This is common for organizations with hybrid infrastructure.

What happens to my data during migration?

+

All data is encrypted in transit using TLS 1.3 and at rest using AES-256. The migration tool creates incremental snapshots and verifies checksums to ensure data integrity. Your source data is never modified or deleted during the migration process.

Do you provide migration support for enterprise customers?

+

Yes. All Professional and Enterprise plans include dedicated migration engineering support. Our team will help you plan, execute, and validate your migration. For Enterprise customers, we provide a dedicated migration engineer throughout the entire process. Contact us to arrange a consultation.

How do I handle custom applications and dependencies?

+

Custom applications are migrated as-is with their runtime environments. The assessment tool identifies dependencies and potential compatibility issues. For applications requiring specific OS versions or custom configurations, we provide containerized migration options to preserve the exact runtime environment.