A simple process to copy or move your Typesense data from one instance to another. Perfect for migrating from Typesense Cloud to your own Docker instance or between any Typesense environments.
- Log in to your Typesense Cloud dashboard
- Go to your collection
- Click on "Export Schema" button
- Save the schema file (it will be a JSON file)
./download_typesense_data.sh -k YOUR_API_KEY -h YOUR_HOST -c YOUR_COLLECTIONThis will create a backup file in .jsonl format.
./migrate_final_upload.sh- Access to Typesense Cloud dashboard
- Source Typesense instance (where your data is currently)
- Destination Typesense instance (where you want to copy data to)
- API keys for both instances
- Basic command line knowledge
- Log in to Typesense Cloud
- Navigate to your collection
- Click "Export Schema" and save the JSON file
- Keep this file safe - you'll need it for the import
# Example: Download from Typesense Cloud
./download_typesense_data.sh -k abc123 -h api.typesense.org -c productsThis will generate a .jsonl file containing your collection data.
# Set your Docker instance details
export TYPESENSE_API_KEY="your_docker_api_key"
export TYPESENSE_HOST="http://localhost:8108"
export COLLECTION_NAME="products"
export SCHEMA_FILE="schema.json" # The schema file you downloaded from Typesense Cloud
# Run the import script
./migrate_final_upload.shHere's a complete example of migrating a collection named "products":
-
Export Schema:
- Log in to Typesense Cloud
- Go to "products" collection
- Export and save as
products-schema.json
-
Download Data:
./download_typesense_data.sh -k cloud_key -h api.typesense.org -c productsThis creates products.jsonl
- Import to Docker:
export TYPESENSE_API_KEY="docker_key"
export TYPESENSE_HOST="http://localhost:8108"
export COLLECTION_NAME="products"
export SCHEMA_FILE="products-schema.json"
./migrate_final_upload.shThat's it! Your data is now copied to the new location. π
- Don't forget to export the schema from Typesense Cloud first!
- This is a COPY operation - your original data remains intact
- Make sure you have enough space for the backup file
- Check your network connection
- Verify your API keys work
- The process might take some time depending on your data size
- Data is exported in
.jsonlformat (JSON Lines) for efficient processing
Feel free to open an issue if you run into any problems!
MIT License - Feel free to use this for your data migration needs!