Closed kathia-barahona closed 1 year ago
Merging #171 (707c475) into master (9654217) will increase coverage by
0.03%
. The diff coverage is70.47%
.
@@ Coverage Diff @@
## master #171 +/- ##
==========================================
+ Coverage 78.77% 78.81% +0.03%
==========================================
Files 17 17
Lines 4400 4493 +93
Branches 995 1016 +21
==========================================
+ Hits 3466 3541 +75
- Misses 696 716 +20
+ Partials 238 236 -2
Files | Coverage Δ | |
---|---|---|
myhoard/controller.py | 82.43% <89.79%> (+0.69%) |
:arrow_up: |
myhoard/backup_stream.py | 79.00% <68.42%> (-0.01%) |
:arrow_down: |
myhoard/web_server.py | 73.93% <45.94%> (-3.08%) |
:arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
About this change: What it does, why it matters
Supports request for preserving/holding a backup till a particular date, this way we can guarantee that the backup is not deleted during a restoration request.
If the oldest backup is being preserved, myhoard will not purge any backup but will keep generating new backups. Purging is resumed till the preservation date is met.
How to request a backup preservation?
For preserving a backup, a request to the HTTP API needs to be performed. For example:
This will trigger the controller on fetching the respective backup stream and storing
preserved_info.json
on the object storage, it will contain the requestpreserve_until
. After storing the file, all backups metadata are immediately refreshed and myhoard considers updatedpreserve_until
values before trying to purge old backups.How to cancel a backup preservation?
This will trigger the controller on fetching the respective backup stream and storing
preserved_info.json
on the object storage, but will store an empty "preseve_until" value.