Endpoint
Authentication
Requires Bearer token authentication via theAuthorization header.
Path Parameters
The UUID of the server
The UUID of the backup to delete
Response
Returns204 No Content on success.
Example Request
Behavior
- Only local backups stored on the Wings node can be deleted
- S3 backups must be deleted through the Panel or directly from S3
- Backup file is permanently deleted from disk
- If the backup doesn’t exist, returns
204 No Content(idempotent) - Backup metadata should be removed from the Panel separately
This endpoint only deletes the backup file from the Wings node. The backup record in the Panel database is not automatically removed.
Local Backup Location
Local backups are stored in the configured backup directory:backup-{uuid}.tar.gz
Error Responses
401 Unauthorized
401 Unauthorized
404 Not Found
404 Not Found
Server does not exist (backup not found is treated as success)
500 Internal Server Error
500 Internal Server Error
Failed to delete backup file (permission error, disk error, etc.)
Use Cases
- Free up disk space by removing old backups
- Clean up failed or corrupted backups
- Remove backups after migrating to S3
- Automated backup rotation scripts
Idempotent Behavior
This endpoint is idempotent:- If the backup exists, it is deleted → Returns
204 - If the backup doesn’t exist, no action is taken → Returns
204 - Multiple DELETE requests have the same effect as a single request
The backup is considered successfully deleted even if it never existed. Check backup existence before deletion if you need to distinguish between these cases.
Best Practices
- Verify backup integrity before deletion in case you need to restore
- Check disk space after deleting large backups
- Coordinate with Panel - ensure Panel backup records are updated
- Implement rotation - delete old backups automatically based on age or count
- Monitor errors - failed deletions may indicate disk or permission issues
Backup Rotation Example
Automated rotation to keep only the 5 most recent backups:Source Reference
Implementation:router/router_server_backup.go:178-199 (deleteServerBackup function)