You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c60dd31
Browse filesBrowse the repository at this point in the historyBrowse files
fix(backupstrategy-controller): reclaim Bucket backups, bound the mirror Job, wire its e2e
Address the round-2 review on the S3 Bucket backup strategy.
- e2e wiring: the backup round-trip lived in hack/e2e-chainsaw/bucket-backup/,
which no Test Impact Analysis rule selected, so a scoped edit to the harness
ran the bucket app-create suite instead and the round-trip never ran under TIA.
Route examples/backups/<app>/ to an "<app>-backup" suite when one exists
(select-e2e.sh), map bucket-backup to the bucket-application source in both
mapping tables so it round-trips (select-install.sh + src_to_suites), and pin
it with a bats case.
- reclaim on delete: deleting a Backup left its mirrored objects orphaned in
cozy-backups. Add an `s3-mirror --mode=delete` that purges a repo prefix, a
cleanupBucketBackup finalizer branch that runs it as a one-shot Job and waits
(failing open on a terminating namespace / missing strategy / unprojectable
credentials, with the skip-artifact-cleanup escape hatch), mirroring Redis.
- mirror Job deadline: the mirror Pod set no activeDeadlineSeconds, so a wedged
copy ran forever. Set one and promote it to the Job in buildJobStrategyBatchJob
so the backoffLimit retries share one ceiling (no-op for drivers without it).
- empty-source restore: a restore-as-copy whose source lists zero objects now
fails instead of reporting success having restored nothing; the refusal no
longer names the CLI-only --allow-empty-source flag.
- TLS: --ca-file now appends to the system roots instead of replacing them, so
the one transport serving both endpoints does not strip public trust from the
side that relies on it.
- tests: cover buildBucketMirrorPod (args, delete flag, deadline, env) and the
s3-mirror purge; docs: the in-place restore note no longer claims byte-for-byte.
Assisted-By: LLM
Signed-off-by: Andrey Kolkov <[email protected]>
Copy file name to clipboardExpand all lines: examples/backups/bucket/90-scenario.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ A tenant stores objects in an `apps.cozystack.io/Bucket` and enables backups by
4
4
5
5
## In-place restore
6
6
7
-
After an accidental deletion the tenant creates a `RestoreJob` with `backupRef` set and no `targetApplicationRef` (`35-restorejob-in-place.yaml`). The driver provisions a read-write `BucketAccess` on the source bucket and mirrors the chosen backup snapshot back over the live contents, deleting objects the snapshot does not contain, so the bucket ends up byte-for-byte as it was at backup time. This is destructive to anything written after the backup — take a fresh backup first if the current state matters.
7
+
After an accidental deletion the tenant creates a `RestoreJob` with `backupRef` set and no `targetApplicationRef` (`35-restorejob-in-place.yaml`). The driver provisions a read-write `BucketAccess` on the source bucket and mirrors the chosen backup snapshot back over the live contents, deleting objects the snapshot does not contain, so the bucket's objects and their content type are restored to the snapshot (object versions and tags are not carried). This is destructive to anything written after the backup — take a fresh backup first if the current state matters.
0 commit comments