Repository navigation
v1.5.1 — Delete S3 copies with backups
Fix
Manual backup deletion now removes the S3 object too.
In v1.5.0, deleting a backup from System → Backups only removed the local archive. The S3 copy was left behind unless retention deleted it later. That was a bug in the manual delete path.
This patch:
- Reads the backup's recorded S3 key before deleting it.
- Deletes the S3 object first, then removes the local archive. If the S3 copy cannot be removed, the local backup is kept and the API returns an error instead of silently leaving an orphaned remote object.
- Still works when new S3 uploads are currently disabled, as long as the stored S3 destination and credentials can still delete the recorded object.
- Updates the confirmation prompt, success message, and audit log to show that the S3 copy was removed.
- Adds E2E coverage proving a manual delete removes the object from a fake S3 bucket as well as the local archive.
The behavior is now:
- Delete the S3 object recorded on the backup sidecar.
- Delete the local archive.
- If step 1 fails, keep the local archive and show the S3 error so it can be fixed and retried.
Important: already-orphaned objects
If you already deleted the local archive under v1.5.0, its local sidecar and filename are gone, so this patch cannot identify that existing S3 object automatically. Delete that one object once in your S3 console or with the CLI, for example:
aws s3 rm s3://YOUR_BUCKET/wireguard-console/backups/OBJECT_NAMEFor MinIO, the equivalent is mc rm. After upgrading, deleting any backup that still appears in the console will remove both copies.
Upgrade notes
- No database migration is required.
- Upgrading replaces the API binary/container; existing S3 configuration and backups are untouched.
- This patch only affects manual deletion. Automatic retention already deleted matching S3 objects.
Verification
- Full E2E against PostgreSQL 18 with a fake S3 endpoint: create an S3-backed backup, manually delete it, assert both the local file and the S3 object are gone.
- Backend:
go test ./...andgo vet ./...green. - Frontend: 273 tests green;
tsc -band production Vite build clean.