We strongly recommend keeping a backup of your data to ensure that you can quickly recover from any unexpected issues. While Algolia does retain temporary backups for operational purposes, these should not be relied upon. Instead, you can easily set up your own backup solution using the API, CLI, or automation tools.
For a full step-by-step of how to create a backup solution, check out our Creating a Backup Solution course on Algolia Academy. It walks through how to back up and restore rules, settings, synonyms, and records in just a few clicks or via the API/CLI.
If you’d prefer a quick reference instead, the following sections outline the main backup options you can use right away.
Backing Up Records
API/CLI
You can export the records in your indices using one of these methods:
- Use the browse method with an API client
- Use the algolia objects browse command with the Algolia CLI
Dashboard
This is not currently possible
Backing Up Settings, Rules, Synonyms
API/CLI
You can export the configuration settings, Rules and synonyms with the following methods:
- Use the getSettings, exportRules and exportSynonyms methods with an API client
- Use the algolia settings get, algolia rules browse or algolia synonyms browse commands with the Algolia CLI
Dashboard
See our documentation here for exporting settings, Rules and synonyms via the dashboard
Automated backups
It is best practice to backup regularly to avoid any loss of data. You could write a script that keeps snapshot backups of your data. In this repo, we have provided a few starter scripts in different programming languages (for example this one in JavaScript).
If you only need to back up settings, synonyms, and rules (not records), you can use GitHub Actions with the Algolia CLI