Upstash Documentation

Database Migrator

a CLI tool to migrate your data to Upstash Search
2 min read

Introduction#

This tool helps you to migrate your data from other service providers (e.g. Algolia, Meilisearch) to your Upstash Search Database.

Migrate Using npx#

The command below prompts you to provide credentials for the indexes that you want to do the migration between.

Using Flags#

You can also provide your credentials and other information as command-line flags. Here are some examples:

Algolia to Upstash#

Meilisearch to Upstash#

Obtaining Credentials#

Upstash#

  1. Go to your Upstash Console.
  2. Select your Search Database.
  3. Under the Details section, you will find your UPSTASH_SEARCH_REST_URL and UPSTASH_SEARCH_REST_TOKEN.
    • --upstash-url corresponds to UPSTASH_SEARCH_REST_URL.
    • --upstash-token corresponds to UPSTASH_SEARCH_REST_TOKEN.

Migration Process#

The migrator will:

  1. Connect to your source database (Algolia or Meilisearch)
  2. Fetch all documents from the specified index
  3. Transform the data to match Upstash Search's format
  4. Upload the documents to your Upstash Search database
  5. Verify the migration by comparing document counts

Data Transformation#

The migrator automatically handles the transformation of your data:

  • Document IDs: Preserved from the source
  • Content: Mapped to Upstash Search's content field
  • Metadata: Preserved as metadata in Upstash Search
  • Searchable fields: All fields become searchable by default
Note

For free tier, 10000 documents can be upserted daily, so a database migration with more than 10000 entries could be interrupted.

Getting Help#

If you encounter any issues during migration:

  1. Check the error messages for specific details
  2. Verify your credentials are correct
  3. Ensure your source database is accessible
  4. Contact support at support@upstash.com

Final Remarks#

If you've come to this point without any issues, congratulations! you may resume your work with upstash search, an advanced, developer frinedly search product.

For further insights, please visit @upstash/search-migrator