Skip to main content
Backup schedules define automated backup jobs with retention policies, inclusion/exclusion patterns, and cron scheduling.

List Backup Schedules

curl -X GET http://localhost:4096/api/v1/backups \
  -H "Cookie: zerobyte.session=..."
Retrieve all backup schedules. Response:
schedules
array

Create Backup Schedule

curl -X POST http://localhost:4096/api/v1/backups \
  -H "Cookie: zerobyte.session=..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Daily Database Backup",
    "volumeId": "abc123",
    "repositoryId": "xyz789",
    "enabled": true,
    "cronExpression": "0 2 * * *",
    "retentionPolicy": {
      "keepDaily": 7,
      "keepWeekly": 4,
      "keepMonthly": 6
    },
    "excludePatterns": ["*.tmp", "*.cache"],
    "oneFileSystem": true
  }'
Create a new backup schedule. Request Body:
name
string
required
Schedule name (1-128 characters)
volumeId
string | number
required
Source volume ID or shortId
repositoryId
string
required
Target repository ID or shortId
enabled
boolean
required
Whether schedule is active
cronExpression
string
required
Cron expression (e.g., “0 2 * * *” for 2 AM daily)
retentionPolicy
object
Snapshot retention policy
excludePatterns
string[]
File patterns to exclude (glob patterns)
excludeIfPresent
string[]
Exclude directories containing these files
includePatterns
string[]
File patterns to include (overrides excludes)
oneFileSystem
boolean
Don’t cross filesystem boundaries
tags
string[]
Tags to apply to snapshots
Response: Returns the created schedule object (without volume/repository nested objects).

Get Backup Schedule

curl -X GET http://localhost:4096/api/v1/backups/{shortId} \
  -H "Cookie: zerobyte.session=..."
Get details for a specific backup schedule. Parameters:
shortId
string
required
Schedule short ID
Response: Returns the schedule object (same structure as list response).

Update Backup Schedule

curl -X PATCH http://localhost:4096/api/v1/backups/{shortId} \
  -H "Cookie: zerobyte.session=..." \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": false,
    "cronExpression": "0 3 * * *"
  }'
Update a backup schedule. Parameters:
shortId
string
required
Schedule short ID
Request Body: Same fields as create (all optional). Response: Returns the updated schedule object.

Delete Backup Schedule

curl -X DELETE http://localhost:4096/api/v1/backups/{shortId} \
  -H "Cookie: zerobyte.session=..."
Delete a backup schedule. Parameters:
shortId
string
required
Schedule short ID
Response:
success
boolean
Whether deletion succeeded

Run Backup Now

curl -X POST http://localhost:4096/api/v1/backups/{shortId}/run \
  -H "Cookie: zerobyte.session=..."
Trigger a backup immediately (ignores schedule). Parameters:
shortId
string
required
Schedule short ID
Response:
success
boolean
Whether backup was started

Stop Running Backup

curl -X POST http://localhost:4096/api/v1/backups/{shortId}/stop \
  -H "Cookie: zerobyte.session=..."
Stop a backup that is currently in progress. Parameters:
shortId
string
required
Schedule short ID
Response:
success
boolean
Whether backup was stopped

Run Retention Policy

curl -X POST http://localhost:4096/api/v1/backups/{shortId}/forget \
  -H "Cookie: zerobyte.session=..."
Manually apply retention policy to clean up old snapshots. Parameters:
shortId
string
required
Schedule short ID
Response:
success
boolean
Whether retention policy was applied

Get Backup Progress

curl -X GET http://localhost:4096/api/v1/backups/{shortId}/progress \
  -H "Cookie: zerobyte.session=..."
Get real-time progress for a running backup. Parameters:
shortId
string
required
Schedule short ID
Response:
percentDone
number | null
Backup progress percentage (0-100), or null if not available
bytesProcessed
number | null
Bytes processed so far
totalBytes
number | null
Total bytes to process
filesProcessed
number | null
Files processed so far
totalFiles
number | null
Total files to process

Reorder Backup Schedules

curl -X POST http://localhost:4096/api/v1/backups/reorder \
  -H "Cookie: zerobyte.session=..." \
  -H "Content-Type: application/json" \
  -d '{
    "scheduleShortIds": ["abc123", "def456", "ghi789"]
  }'
Reorder backup schedules by providing an array in desired order. Request Body:
scheduleShortIds
string[]
required
Array of schedule short IDs in desired order
Response:
success
boolean
Whether reordering succeeded

Get Schedule Mirrors

curl -X GET http://localhost:4096/api/v1/backups/{shortId}/mirrors \
  -H "Cookie: zerobyte.session=..."
Get mirror repository assignments for a backup schedule (for multi-repository replication). Parameters:
shortId
string
required
Schedule short ID
Response:
mirrors
array
Mirror repository assignments

Update Schedule Mirrors

curl -X PUT http://localhost:4096/api/v1/backups/{shortId}/mirrors \
  -H "Cookie: zerobyte.session=..." \
  -H "Content-Type: application/json" \
  -d '{
    "mirrors": [
      {
        "repositoryId": "repo123",
        "enabled": true
      }
    ]
  }'
Update mirror repository assignments. Parameters:
shortId
string
required
Schedule short ID
Request Body:
mirrors
array
required
Mirror assignments
Response: Returns updated mirror assignments array.

Get Mirror Compatibility

curl -X GET http://localhost:4096/api/v1/backups/{shortId}/mirrors/compatibility \
  -H "Cookie: zerobyte.session=..."
Check which repositories are compatible for mirroring with this schedule. Parameters:
shortId
string
required
Schedule short ID
Response:
repositories
array
Repository compatibility status

Build docs developers (and LLMs) love