Skip to main content

Service Backups

Scheduled volume backups for services with persistent disks. Set a cron schedule, choose a retention window, and RailPush snapshots the disk automatically -- restore to any saved point in seconds.

How it works

  • Backups are snapshots of the persistent disk attached to a service
  • Snapshots are stored in the same region as your service -- no cross-region egress
  • Restore replaces the disk contents and triggers an automatic redeploy
  • Old snapshots are pruned automatically based on your retention setting

Configure a backup schedule

API: Create backup schedule
curl -X POST https://railpush.com/api/v1/services/<id>/backups/schedule \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"cron": "0 2 * * *",
"retention_count": 7
}'
# Runs a backup every day at 02:00 UTC, keeping the 7 most recent snapshots

Trigger a manual backup

API: Manual backup
curl -X POST https://railpush.com/api/v1/services/<id>/backups \
-H "Authorization: Bearer <token>"

# Response: { "id": "bkp-...", "status": "in_progress", "created_at": "..." }

Restore from a backup

API: Restore
# List available backups
curl https://railpush.com/api/v1/services/<id>/backups \
-H "Authorization: Bearer <token>"

# Restore to a specific backup
curl -X POST https://railpush.com/api/v1/services/<id>/backups/<backup-id>/restore \
-H "Authorization: Bearer <token>"
# This replaces the disk contents and triggers a redeploy
Restore is destructive

Restoring overwrites the current disk state. Your service will restart after restore completes. Make a manual backup before restoring if you want to preserve the current state.

API reference

MethodEndpointDescription
GET/api/v1/services/:id/backupsList all backups for a service
POST/api/v1/services/:id/backupsTrigger a manual backup
GET/api/v1/services/:id/backups/scheduleGet backup schedule
POST/api/v1/services/:id/backups/scheduleCreate or update backup schedule
DELETE/api/v1/services/:id/backups/scheduleDelete backup schedule
POST/api/v1/services/:id/backups/:bid/restoreRestore from a backup