Automate File Deletion and Reduce Storage Costs with Backblaze B2 Lifecycle Rules

Created 4/12/2026 at 5:38:52 PMEdited 4/12/2026 at 5:40:43 PM

If you back up your files to Backblaze B2 using software that uploads files when they change, Backblaze B2 retains old versions of the file. This is helpful because the old versions can be used if the original file is accidentally deleted. On the other hand, keeping old versions forever can clutter things. For an application like this, you may want a Lifecycle Rule that keeps old versions in a backup/ folder for 30 days and then deletes them, as in the following example:

Keep only the last version of the file This rule keeps only the most current version of a file. The previous version of the file is "hidden" for one day and then deleted.

Public