This guide will help you migrate your data from a regional Upstash Redis database to a global database. We strongly recommend you to use Upstash Redis Global for your application. Our legacy regional Redis databases will be deprecated in the future. Upstash Global Redis has better performance and more feature set

Prerequisites

Before starting the migration, make sure you have:

  1. An existing regional Upstash Redis database (source)
  2. A new global Upstash Redis database (destination)
  3. Access to both databases’ credentials (connection strings, passwords)

Migration Process

There are several official ways to migrate your data:

If your regional database is hosted in AWS, you can use Upstash’s backup/restore feature:

  1. Create a backup of your regional database:

    • Go to your regional database details page
    • Navigate to the Backups tab
    • Click the Backup button
    • Provide a unique name for your backup
    • Wait for the backup process to complete

    During backup creation, some database operations will be temporarily unavailable.

  2. Restore the backup to your global database:

    • Go to your global database details page
    • Navigate to the Backups tab
    • Click Restore...
    • Select your regional database as the source
    • Select the backup you created
    • Click Start Restore

    The restore operation will flush (delete) all existing data in your global database before restoring the backup.

2. Using Upstash Console Migration Wizard

The easiest way to migrate your data is using the Upstash Console’s built-in migration wizard:

  1. Go to Upstash Console
  2. In the database list page, click the Import button
  3. Select your source (regional) database
  4. Select your destination (global) database
  5. Follow the wizard instructions to complete the migration

Note: The destination database will be flushed before migration starts.

3. Using upstash-redis-dump

Another reliable method is using the official upstash-redis-dump tool:

  1. Install upstash-redis-dump:

    npm install -g upstash-redis-dump
    
  2. Export data from regional database:

    upstash-redis-dump -db 0 -host YOUR_REGIONAL_HOST -port YOUR_DATABASE_PORT -pass YOUR_PASSWORD -tls > redis.dump
    
  3. Import data to global database:

    cat redis.dump | upstash-redis-dump -db 0 -host YOUR_GLOBAL_HOST -port 6379 -pass YOUR_PASSWORD -tls -import
    

Verification

After migration, verify your data:

  1. Compare key counts in both databases
  2. Sample test some keys to ensure data integrity

Post-Migration Steps

  1. Update your application configuration to use the new Global database URL
  2. Test your application thoroughly with the new database
  3. Monitor performance and consistency across regions
  4. Keep the regional database as backup for a few days
  5. Once verified, you can safely delete the regional database

Need Help?

If you encounter any issues during migration, please contact Upstash support or visit our Discord community for assistance.