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:
Short identifier for URLs
Whether schedule is active
Cron expression for scheduling
Snapshot retention policy
Exclude directories containing these files
File patterns to include (overrides excludes)
Don’t cross filesystem boundaries
Unix timestamp of last backup
Last backup status: “success”, “error”, “in_progress”, “warning”
Last backup error message
Unix timestamp of next scheduled backup
Unix timestamp in milliseconds
Unix timestamp in milliseconds
Associated repository object
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:
Schedule name (1-128 characters)
Source volume ID or shortId
Target repository ID or shortId
Whether schedule is active
Cron expression (e.g., “0 2 * * *” for 2 AM daily)
Snapshot retention policy
Keep snapshots within duration (e.g., “30d”, “1y”)
File patterns to exclude (glob patterns)
Exclude directories containing these files
File patterns to include (overrides excludes)
Don’t cross filesystem boundaries
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:
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:
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:
Response:
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:
Response:
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:
Response:
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:
Response:
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:
Response:
Backup progress percentage (0-100), or null if not available
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:
Array of schedule short IDs in desired order
Response:
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:
Response:
Mirror repository assignments
Whether mirroring is enabled
Unix timestamp of last mirror copy
Last copy status: “success”, “error”, “in_progress”
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:
Request Body:
Mirror assignments
Repository ID to mirror to
Whether mirroring is enabled
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:
Response:
Repository compatibility status
Whether repository is compatible