Backup Management

Opensolr Backup Management — find answers to your questions

API - Download backup file

API Endpoint

Download Index Backup File

Download a backup file from the Opensolr backup servers. Backup files are accessed via HTTPS with your index HTTP Basic Auth credentials — not your Opensolr account credentials.

Endpoint

GET https://backup.opensolr.com/<INDEX_NAME>/<BACKUP_FILE_NAME>

Authentication

Important: The username and password are the HTTP Auth credentials of your Opensolr Index, NOT your Opensolr account login. Each Opensolr Index is protected by HTTP Basic Auth over HTTPS.

If you have not changed them, the default credentials are:
Username: opensolr
Password: Your Secret API Key found in your Opensolr Dashboard

Parameters

ParameterStatusDescription
INDEX_NAMErequiredThe name of your Opensolr index (used in the URL path)
BACKUP_FILE_NAMErequiredThe backup file name. Get this from the List Backup Files API
usernamerequiredHTTP Basic Auth username for your index
passwordrequiredHTTP Basic Auth password for your index
Backup URL structure: https://backup.opensolr.com/<INDEX_NAME> contains the latest backup of your index, plus daily backup archives from the last 10 days.

Code Examples

cURL

curl -s -u "USERNAME:PASSWORD" -o backup.tar.gz \
  "https://backup.opensolr.com/YOUR_INDEX/BACKUP_FILE_NAME"

PHP

$ch = curl_init('https://backup.opensolr.com/YOUR_INDEX/BACKUP_FILE_NAME');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'USERNAME:PASSWORD',
]);
$data = curl_exec($ch);
curl_close($ch);
file_put_contents('backup.tar.gz', $data);
echo "Backup saved to backup.tar.gz\n";

Python

import requests

response = requests.get(
    "https://backup.opensolr.com/YOUR_INDEX/BACKUP_FILE_NAME",
    auth=("USERNAME", "PASSWORD"),
    stream=True
)
with open("backup.tar.gz", "wb") as f:
    for chunk in response.iter_content(chunk_size=8192):
        f.write(chunk)
print("Backup saved to backup.tar.gz")

Related Documentation

Create Backup

Create a new backup snapshot of your Opensolr index.

List Backup Files

Get a list of all available backup files for your index.

Backup Guide

Complete guide to Opensolr backups: enable, create, restore, and download.

Need help with backups or disaster recovery? We can help.

Contact Support
Read Full Answer

API - Get list of backup files

API Endpoint

Get List of Backup Files

Retrieve a list of all available backup files for a specific Opensolr index. Use this to find backup file names before downloading them.

Endpoint

GET https://opensolr.com/solr_manager/api/get_backup_files_list

Parameters

ParameterStatusDescription
emailrequiredYour Opensolr registration email address
api_keyrequiredYour Opensolr API key
core_namerequiredThe name of the index you wish to get the backup files list for

Code Examples

cURL

curl -s "https://opensolr.com/solr_manager/api/get_backup_files_list?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=YOUR_INDEX"

PHP

$params = http_build_query([
    'email'     => 'YOUR_EMAIL',
    'api_key'   => 'YOUR_API_KEY',
    'core_name' => 'YOUR_INDEX',
]);
$response = json_decode(file_get_contents(
    'https://opensolr.com/solr_manager/api/get_backup_files_list?' . $params
), true);
print_r($response);

Python

import requests

response = requests.get(
    "https://opensolr.com/solr_manager/api/get_backup_files_list",
    params={
        "email": "YOUR_EMAIL",
        "api_key": "YOUR_API_KEY",
        "core_name": "YOUR_INDEX",
    }
)
data = response.json()
print(data)

Related Documentation

Create Backup

Create a new backup snapshot of your Opensolr index.

Download Backup

Download a backup file to your local machine via HTTP.

Backup Guide

Complete guide to Opensolr backups: enable, create, restore, and download.

Need help with backups or disaster recovery? We can help.

Contact Support
Read Full Answer

API - Create backup

API Endpoint

Create Index Backup

Create a backup snapshot of your Opensolr index. The backup is stored on the Opensolr backup servers and can be listed or downloaded later using the backup management API endpoints.

Endpoint

GET https://opensolr.com/solr_manager/api/create_backup

Parameters

ParameterStatusDescription
emailrequiredYour Opensolr registration email address
api_keyrequiredYour Opensolr API key
core_namerequiredThe name of the index you wish to create a backup for

Code Examples

cURL

curl -s "https://opensolr.com/solr_manager/api/create_backup?email=YOUR_EMAIL&api_key=YOUR_API_KEY&core_name=YOUR_INDEX"

PHP

$params = http_build_query([
    'email'     => 'YOUR_EMAIL',
    'api_key'   => 'YOUR_API_KEY',
    'core_name' => 'YOUR_INDEX',
]);
$response = json_decode(file_get_contents(
    'https://opensolr.com/solr_manager/api/create_backup?' . $params
), true);
print_r($response);

Python

import requests

response = requests.get(
    "https://opensolr.com/solr_manager/api/create_backup",
    params={
        "email": "YOUR_EMAIL",
        "api_key": "YOUR_API_KEY",
        "core_name": "YOUR_INDEX",
    }
)
data = response.json()
print(data)
Find your credentials in the Opensolr Dashboard. Your API key is listed under your account settings.

Related Documentation

List Backup Files

Get a list of all available backup files for your index.

Download Backup

Download a backup file to your local machine via HTTP.

Backup Guide

Complete guide to Opensolr backups: enable, create, restore, and download.

Need help with backups or disaster recovery? We can help.

Contact Support
Read Full Answer