Backup Configuration
Act2 provides a robust, built-in backup system for stateful services. While earlier versions used a manual JSON configuration within the volumes field, this method is now deprecated. All backup configuration should be managed via the ACT Dashboard or the dedicated Backup API.
Configuring Backups via UI
- Navigate to your Service Details page.
- Go to the Backups tab (or look for the “Backup Settings” section).
- Click Configure Backups.
- Select your Backup Strategy:
- Postgres: Dumps your database using
pg_dump. - MySQL: Dumps your database using
mysqldump. - Volume Snapshot: Backs up the entire persistent volume using Restic.
- Postgres: Dumps your database using
- Set your Schedule using a Cron expression (e.g.,
0 0 * * *for daily at midnight). - Set the Retention Policy (number of days to keep backups).
- Select a Storage Provider (S3 or MinIO).
API Reference
The primary endpoint for managing backups is /api/v1/resources/{id}/backup-config.
Get Configuration
GET /api/v1/resources/{id}/backup-config
Response:
{
"id": "uuid",
"resource_id": "uuid",
"strategy": "postgres",
"frequency_cron": "0 0 * * *",
"retention_days": 14,
"enabled": true,
"storage_provider_id": "uuid",
"created_at": "timestamp",
"updated_at": "timestamp"
}
Update Configuration
POST /api/v1/resources/{id}/backup-config
Request Body:
{
"strategy": "postgres",
"frequency_cron": "0 0 * * *",
"retention_days": 14,
"enabled": true,
"storage_provider_id": "uuid"
}
Legacy (Deprecated) - Manual JSON
[!WARNING] This method is deprecated and may be removed in a future version. Use the UI or the
/backup-configAPI instead.
Legacy configurations were stored under the _backup key inside the volumes JSON field. The system still supports reading these for backward compatibility, but they should be migrated to the new schema.
{
"_backup": {
"type": "postgres",
"interval_hours": 24,
"retention_count": 7,
"storage_provider_id": "uuid"
}
}