Backup Management API
Restore a Backup
Queues the restoration of an index from a backup file you previously created. Restore the full snapshot (data + configuration) or only the configuration files, using one of the file names returned by get_backup_files_list.
Endpoint
GET https://opensolr.com/solr_manager/api/restore_backup
Parameters
| Parameter | Status | Description |
|---|---|---|
email | Required | Your Opensolr registration email address |
api_key | Required | Your Opensolr API key (master key, or a scoped key that allows this endpoint) |
core_name | Required | The index to restore into |
backup_file | Required | A file name exactly as listed by get_backup_files_list (e.g. my_index_08_28_2026-20.02.02.tar, or the ..._conf.tar variant for configuration only) |
type | Optional | full (default) restores data and configuration; conf restores configuration files only |
How It Works
The call validates ownership and queues a restore_backup job; the response is immediate and the job runs on the Opensolr job processor within about a minute. A full restore replaces the index data with the snapshot and reloads the index; a conf restore only puts the configuration files back and reloads. Every create_backup run produces both a full archive and a matching _conf.tar, so both restore types are always available for a given snapshot.
Data is replaced, not merged. Documents added after the snapshot are lost on a full restore. Take a fresh backup first if you may need to roll forward again.
Response
| Key | Type | Description |
|---|---|---|
status | bool | true when the job was queued |
msg | string | Your backup file will be restored momentarily. |
Code Examples
cURL
curl -s "https://opensolr.com/solr_manager/api/restore_backup?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=my_index&backup_file=my_index_08_28_2026-20.02.02.tar&type=full"
PHP
$q = http_build_query(['email' => 'YOUR_EMAIL', 'api_key' => 'YOUR_API_KEY', 'core_name' => 'my_index', 'backup_file' => 'my_index_08_28_2026-20.02.02.tar', 'type' => 'full']); echo file_get_contents("https://opensolr.com/solr_manager/api/restore_backup?{$q}");
Python
import requests auth = {"email": "YOUR_EMAIL", "api_key": "YOUR_API_KEY", "core_name": "my_index"} files = requests.get("https://opensolr.com/solr_manager/api/get_backup_files_list", params=auth, timeout=30).json()["msg"] latest = sorted(f for f in files if f.endswith(".tar"))[-1] print(requests.get("https://opensolr.com/solr_manager/api/restore_backup", params={**auth, "backup_file": latest, "type": "full"}, timeout=30).json())
Example Response
{"status": true, "msg": "Your backup file will be restored momentarily."}
Use Cases
- Roll back an index after a bad crawl or a broken bulk import
- Recover a configuration you overwrote (type=conf) without touching the data
- Clone a known-good state into a staging index before experimenting
Related Documentation
Create BackupTake the snapshot to restore from.List Backup FilesFind the exact file name to pass.Download Backup FileKeep an off-site copy.Reset Index DataWipe instead of restore.
Need help with the Opensolr API? We are here to help.
Contact Support