Export and import indices and settings
An Algolia index has records and configuration data, including settings, synonyms, and rules. Exporting your records and configuration can be useful when you need to:
- Back up your index.
- Track changes to the index configuration (for example, with a version control system).
- Apply the same configuration to multiple indices. For example, in staging and production environments, or if you use different indices for different geographical regions.
Export and import records
To export your records as a JSON file, use one of these options:
- Algolia CLI:
algolia objects browse
- API clients:
browse
You can’t export records from the Algolia dashboard.
For information about importing or uploading your records, see Send and update your data.
Export and import index configurations
Your index configuration includes:
Export index configuration in the Algolia dashboard
To export the configuration of an index from the Algolia dashboard as a JSON file:
- Go to the Algolia dashboard and select your Algolia application.
- On the left sidebar, select Search.
-
Select your Algolia index:
-
Select Manage index > Export Configuration.
- Select what you want to export: Settings, Synonyms, or Rules.
- Click Export Configuration to download a JSON file with the index configuration.
Export index configuration with the Algolia CLI
With the Algolia CLI, you can export an index configuration with the
algolia indices config export
command.
This creates a JSON file that you can import in the dashboard, for example, for another index.
To export your settings, rules, or synonyms individually, use these commands:
Check the Algolia CLI examples for more information.
Export index configuration with the API
With the API clients, you can export your index settings, rules, and synonyms, using these methods:
Import index configuration in the Algolia dashboard
- Go to the Algolia dashboard and select your Algolia application.
- On the left sidebar, select Search.
-
Select your Algolia index:
-
Select Manage index > Import Configuration.
- Select the JSON file you want to import.
- Choose what you want to import: Settings, Synonyms, or Rules.
-
Type
IMPORT
to confirm and click Import Configuration.Importing settings replaces all existing index settings with the imported ones. Synonyms and rules are replaced if a synonym or rule with the same
objectID
already exists. Otherwise, new synonyms or rules are added.
Import index configuration with the Algolia CLI
To import the configuration of an index with the Algolia CLI,
use the algolia indices config import
command.
The command expects a JSON file with "settings"
, "rules"
, or "synonyms"
keys,
which you can get by exporting an index configuration from the dashboard or with the Algolia CLI.
To import settings, rules, or synonyms individually, use these commands:
Check the Algolia CLI examples for more information.
Import index configuration with the API
With the API clients, you can use these methods for importing settings, rules, or synonyms into your index: