When Backblaze B2 lifecycle rules overlap, the smallest value for each of the three settings applies to the matching file.
Key takeaways
- List the rules that match each coaching file.
- Compare upload, deletion, and unfinished-upload timers separately.
- Check effective retention against your recovery needs.
- Test rule changes in a separate bucket.
You want to keep the call notes, recordings, and feedback documents you need, and you do not want to pay to store old copies you no longer use. Lifecycle rules handle the second part.
Keeping a copy of your work is worth the effort. The Canadian Centre for Cyber Security puts it plainly: "Having a backup (a copy) of your organization’s information is one step that you can take to improve your cyber security and your resiliency." ( Canadian Centre for Cyber Security, Tips for backing up your information) A backup only helps if you know how long older copies stay around. That is what lifecycle rules control.
This post covers three settings to check when two lifecycle rules match the same coaching file. It explains how B2 decides which values apply when rules overlap, and it ends with a checklist you can run on your own bucket. The documented examples use the values from Backblaze's documentation, so you can compare your setup against them directly.
What a lifecycle rule does
The B2 documentation describes the feature this way: "Lifecycle Rules enable the Backblaze B2 Cloud Storage service to automatically hide and delete older versions of files that are stored in Backblaze B2." ( Backblaze, Automate File Deletion with Backblaze B2 Lifecycle Rules)
Two verbs in that sentence matter: hide and delete. They are separate steps, and the settings you will check map onto them. The documentation explains that "Files are automatically hidden when they are replaced with a new version of the file, or they can be explicitly hidden using b2_hide_file." ( Backblaze, Automate File Deletion with Backblaze B2 Lifecycle Rules) So when a rep uploads a new version of a coaching deck, the old version is hidden first. It is removed later, on a separate timer.
Rules are not all-or-nothing. The same documentation says: "You can apply Lifecycle Rules to some or all of the files in a Backblaze B2 bucket, and each bucket has its own Lifecycle Rules." ( Backblaze, Automate File Deletion with Backblaze B2 Lifecycle Rules) A rule can cover only part of a bucket, such as one folder of coaching files. It also means you must check each bucket on its own.
The usual goal is to keep older versions for a set time and then clear them out.
Rules also pile up. "You can set up to 100 Lifecycle Rules on one bucket." ( Backblaze, Automate File Deletion with Backblaze B2 Lifecycle Rules) A busy coaching bucket can collect rules over several years.
Why two rules can match one file
Once you have several rules, the same file can fall under more than one of them. A rule that covers all coaching files and a rule that covers the onboarding folder will both match a file in the onboarding folder. Which rules match a given file depends on how each rule is written, so the first job is to find out what each rule covers.
The Backblaze documentation gives a single-match example, which makes a useful baseline. It states the applied values for a file that matches only one rule: "A file like images/cats/mycat.gif matches only the first rule, so the applied values are daysFromUploadingToHiding: 1, daysFromStartingToCancelingUnfinishedLargeFiles: 2, and daysFromHidingToDeleting: 5." ( Backblaze, Automate File Deletion with Backblaze B2 Lifecycle Rules)
When only one rule matches, you read its three values and you are done. When two or more rules match, you need the extra step covered later in this post.
Before you do anything else, make a simple map. List each folder in the coaching bucket, then list the rules that cover it. Put a mark wherever a rule covers a folder. Any folder with more than one mark is where overlaps will show up, so start your review there. For organizing recordings before this review, see filing example sales calls.
The first setting: daysFromUploadingToHiding
The first setting controls how many days after upload a file version is hidden. Every rule that covers a coaching file has its own value for this setting, and you should write each one down.
In the single-match example, this value is 1. That is a short window. Hidden is not the same as deleted, but hiding is the first step toward removal, so it is worth checking early.
For a sales manager, the practical question is simple. How long after upload should a coaching file be hidden if it has not been replaced? Replacement automatically hides the earlier version independently of this setting.
The second setting: daysFromHidingToDeleting
The second setting decides how long a hidden version survives before it is deleted. It is the setting most tied to the question "how far back can I recover a coaching file?"
The documentation gives a direct example: "Because files are automatically hidden when replaced by a newer version, if you set this property to 10, then the older version is deleted 10 days after you upload a newer version of the file." ( Backblaze, Automate File Deletion with Backblaze B2 Lifecycle Rules) The number you set here is the number of days a replaced version lives before it is gone.
In the single-match example, this value is 5. If a second rule also matches the same file and sets a different value, you do not get to choose the one you like better. The overlap section explains which value B2 applies.
This setting also has the most direct link to recovery. A coaching file is only useful if the version you need is still there when you go looking for it. Ask how far back a manager would reasonably need to go to find a previous version of a recording or a feedback document. Then compare that answer with the effective value for each folder, not the value on the rule you remember setting up. For files kept elsewhere, review deleted coaching file restore windows.
The third setting: daysFromStartingToCancelingUnfinishedLargeFiles
The third setting concerns large uploads that were started but never finished. If a rep begins uploading a big recording and the upload stalls, this setting controls how long the unfinished upload is kept before it is canceled.
In the single-match example, this value is 2. Its name points to unfinished uploads rather than the finished coaching files you keep, so it usually matters less to your retention plan than the first two settings. It still belongs on your checklist, because an overlapping rule can set it too.
How B2 picks values when rules overlap
The documentation does not say the newest rule wins, or that the first rule in a list wins. It says: "The system takes the smallest value for each property, so the applied values are daysFromUploadingToHiding: 1, daysFromStartingToCancelingUnfinishedLargeFiles: 2, and daysFromHidingToDeleting: 4." ( Backblaze, Automate File Deletion with Backblaze B2 Lifecycle Rules)
It does not pick one whole rule and use all of its values. The shortest hiding window can come from one rule, while the shortest deletion window comes from another.
The documentation gives another combined result: "The effective values combine the smallest values from each rule: daysFromUploadingToHiding: 1, daysFromHidingToDeleting: 1, and daysFromStartingToCancelingUnfinishedLargeFiles: 2." ( Backblaze, Automate File Deletion with Backblaze B2 Lifecycle Rules)
Compare the results. In the single-match case, the deletion window was 5 days. In the combined case, the effective deletion window drops to 1 day.
Illustrative example: a shorter deletion window
Here is a plain way to think about it. Imagine a broad rule that protects every coaching file for a long time, and a narrow rule you added last year for a short training series. If the narrow rule also matches the broad rule's files, its short deletion window can win for every matching file, including the ones you meant to keep.
For this illustrative example, give the broad rule a hiding-to-deletion value of 30 days and the narrow rule 10 days. A replaced file matching both has a 10-day deletion window. Compare that result with your recovery plan before changing the rules.
A checklist for your coaching bucket
Work through this list once, then repeat it whenever someone adds a rule.
- List every rule on the bucket. Write down each rule's name, the files it covers, and its three values.
- Use the exact property names. Record daysFromUploadingToHiding, daysFromHidingToDeleting, and daysFromStartingToCancelingUnfinishedLargeFiles for every rule. Exact names make it easier to compare notes with a developer or support engineer.
- Mark the overlaps. Pick a few representative file paths from each coaching folder, and list every rule that matches each path. Any path with more than one match needs the smallest-value check.
- Apply the smallest-value rule. For each overlapping path, take the smallest value for each of the three settings. These are the effective values B2 will use. Do not assume one rule's full set of values applies.
- Compare the effective values with your plan. Ask whether the effective hiding-to-deletion window is long enough to recover a recent coaching file. Ask whether the upload-to-hiding window matches what you expected. If not, you have a problem to fix.
- Fix the cause, not the symptom. Narrow a rule's scope so it stops matching files it should not touch, or change a short value on a rule that covers files you want to keep longer. Then rerun the smallest-value check on the affected paths.
- Test in a separate bucket. Create a test bucket, add the same rules, upload a sample file, and replace it with a newer version. The timers are measured in days, so plan the test ahead of time. The goal is to confirm that your reading of the rules matches what you see.
Common overlap patterns
You may recognize your own setup in one of them.
The first is a broad rule with a narrow rule on top. A broad rule covers all coaching files, and a narrower rule covers a single folder, such as a training series or a product launch. Every file in that folder matches both rules. Compare each setting on the narrow rule with the same setting on the broad rule, then work out which value wins.
The second is two rules that cover the same folder for different reasons. One may clean up drafts, and another may keep final recordings for a set time. Both match the same files. Neither rule looks wrong when read alone, which is why the folder map from earlier is worth the time.
The third is a rule left behind after a project ends. A campaign may need its own rule for a few months. Ask who added each rule and why, and remove rules that no longer have a purpose. If you are unsure, change the rule in a test bucket first and check the effect on a sample file.
Mistakes to avoid
Checking only one rule. Someone opens the rule they remember, sees a long retention window, and assumes that is what applies. If another rule also matches the file, the smallest value for each setting may come from that other rule.
Assuming the newest rule wins. If a folder needs a specific value, make sure every other matching rule is consistent with it.
Treating hidden as gone. Hiding is a step on the way to deletion, not the end of the process. If you need a replaced version back, the deletion timer is the one that matters.
What to do today
Start with the list of rules on your bucket. Write down the three values for each rule, find the files that match more than one rule, and apply the smallest-value check. Then compare the result with how far back you need to recover a file. If the numbers do not match your plan, change the rules before you need them.
Keep the rule list with your other bucket records, and update it whenever someone adds or removes a rule.
Related guides: Automated call scoring rules from 4 publishers · Call handling: 9 rules to check before coaching · Check 9 chat rules for private sales coaching calls.
Common questions
Which settings should I record?
Record daysFromUploadingToHiding, daysFromHidingToDeleting, and daysFromStartingToCancelingUnfinishedLargeFiles. Keep their effective values beside each file path you review.
How should I check a proposed change?
Test the proposed rules in a separate bucket with a sample file and a replacement version. Allow for the timers measured in days before comparing the result with your plan.