Back to Blog

Introducing Automatic Database Backups in ArcadeDB

We’re excited to announce a highly requested feature: Automatic Database Backups with scheduled execution and intelligent retention policies. This new feature makes it easier than ever to protect your data with zero-downtime backups that run automatically in the background. Available on version 26.2.1+.

Why Automatic Backups?

Data protection is critical for any production database. While ArcadeDB has always supported on-demand backups via SQL commands, many users requested the ability to:

  • Schedule backups to run automatically (e.g., every night at 2 AM)
  • Define retention policies to manage disk space
  • Configure different backup strategies per database
  • Monitor backup status through the web UI

The new Automatic Backup Scheduler addresses all these needs with a flexible, easy-to-configure solution.

Using Automatic Backups from Studio

The easiest way to configure automatic backups is through the ArcadeDB Studio web interface.

Server-Level Configuration

Navigate to the Server panel and click on the Backup tab:

Server Backup Configuration

From here, you can configure:

General Settings

  • Auto-Backup Enabled: Toggle automatic backups on or off
  • Backup Directory: Where backups are stored (relative to server root, e.g., ./backups)
  • Run On Server: In HA clusters, choose which node runs backups ($leader recommended)

Schedule

  • Schedule Type: Choose between frequency-based (every N minutes) or CRON expressions
  • Frequency: For simple schedules, just set the interval in minutes
  • CRON Expression: For advanced scheduling like “every day at 2 AM”
  • Time Window: Optionally restrict backups to off-peak hours

Retention Policy

  • Max Backup Files: Simple limit on backup count per database
  • Tiered Retention: Keep hourly, daily, weekly, monthly, and yearly backups using a grandfather-father-son rotation scheme

Click Save Configuration to apply your settings. The configuration is stored in config/backup.json.

Note: If this is the first time enabling automatic backups, a server restart is required to activate the scheduler plugin.

Database-Level Backup Management

Each database has its own Backup tab in the Database panel:

Database Backup Tab

This view shows:

  • Current backup configuration for the selected database
  • Total backup count and disk space used
  • List of all available backups with timestamps and file sizes

You can also trigger an immediate backup by clicking Backup Now.

JSON Configuration Reference

For automation and infrastructure-as-code workflows, you can configure backups directly via the config/backup.json file.

Basic Configuration

Here’s a minimal configuration that backs up all databases every hour:

{
  "version": 1,
  "enabled": true,
  "backupDirectory": "./backups",
  "defaults": {
    "enabled": true,
    "schedule": {
      "type": "frequency",
      "frequencyMinutes": 60
    },
    "retention": {
      "maxFiles": 10
    }
  }
}

Complete Configuration Example

Here’s a production-ready configuration with all options:

{
  "version": 1,
  "enabled": true,
  "backupDirectory": "./backups",
  "defaults": {
    "enabled": true,
    "runOnServer": "$leader",
    "schedule": {
      "type": "cron",
      "expression": "0 0 2 * * ?",
      "timeWindow": {
        "start": "01:00",
        "end": "05:00"
      }
    },
    "retention": {
      "maxFiles": 50,
      "tiered": {
        "hourly": 24,
        "daily": 7,
        "weekly": 4,
        "monthly": 12,
        "yearly": 3
      }
    }
  },
  "databases": {
    "production": {
      "schedule": {
        "type": "frequency",
        "frequencyMinutes": 30
      },
      "retention": {
        "maxFiles": 100
      }
    },
    "analytics": {
      "runOnServer": "replica-1",
      "schedule": {
        "type": "cron",
        "expression": "0 0 3 * * ?"
      }
    },
    "development": {
      "enabled": false
    }
  }
}

CRON Expression Format

The scheduler uses 6-field CRON expressions:

second minute hour day-of-month month day-of-week

Common Examples:

Expression Description
0 0 2 * * ? Every day at 2:00 AM
0 0 */6 * * ? Every 6 hours
0 30 1 * * 0 Every Sunday at 1:30 AM
0 0 3 1 * ? First day of each month at 3:00 AM
0 0 0 * * 1-5 Every weekday at midnight

High Availability Cluster Support

In an HA cluster, the runOnServer setting controls which node performs backups:

Value Behavior
$leader Only the current leader runs backups (recommended)
* All nodes run backups independently
node-name Only the specified node runs backups

Using $leader is recommended because it ensures exactly one backup per schedule and automatically fails over if leadership changes.

Backup Directory Structure

Backups are organized by database name:

backups/
├── customers/
│   ├── customers-backup-20250127-020000.zip
│   ├── customers-backup-20250128-020000.zip
│   └── customers-backup-20250129-020000.zip
├── orders/
│   ├── orders-backup-20250127-020000.zip
│   └── orders-backup-20250128-020000.zip
└── analytics/
    └── analytics-backup-20250127-030000.zip

Each backup is a compressed ZIP file containing a complete, consistent snapshot of the database.

Tiered Retention: The Grandfather-Father-Son Strategy

The tiered retention policy implements a classic backup rotation scheme:

  • Hourly: Keep one backup per hour for the last N hours
  • Daily: Keep one backup per day for the last N days
  • Weekly: Keep one backup per week for the last N weeks
  • Monthly: Keep one backup per month for the last N months
  • Yearly: Keep one backup per year for the last N years

This approach provides excellent recovery point options while efficiently managing disk space. For example, with the default settings, you can restore to:

  • Any hour in the last 24 hours
  • Any day in the last week
  • Any week in the last month
  • Any month in the last year
  • Any year in the last 3 years

Getting Started

  1. Create a config/backup.json file with your desired configuration
  2. Restart the ArcadeDB server to activate the scheduler
  3. Monitor the logs or Studio to verify backups are running
  4. Optionally configure per-database overrides for critical databases

That’s it! Your databases are now automatically protected with scheduled backups.

Conclusion

Automatic backups bring enterprise-grade data protection to ArcadeDB with minimal configuration. Whether you’re running a single server or a distributed HA cluster, the new backup scheduler provides flexible scheduling, intelligent retention, and easy monitoring through Studio.

We’d love to hear your feedback on this feature. Join the discussion on GitHub or our community channels.


This feature is available in ArcadeDB 26.2.1 and later.