Configure and Manage Lifecycle Rules
    • Dark
      Light

    Configure and Manage Lifecycle Rules

    • Dark
      Light

    Article Summary

    Lifecycle Rules enable the Backblaze B2 Cloud Storage service to automatically hide and delete older versions of your files that are stored in Backblaze B2. Each Backblaze B2 bucket can have its own Lifecycle Rules, and you can apply Lifecycle Rules to some or all of the files in your bucket.

    To configure Lifecycle rules using the API, click here.

    To configure Lifecycle rules using the command-line interface, click here.

    Configure Lifecycle Rules

    Before you begin: You must have a Backblaze B2 account and at least one bucket.

    1. Sign in to your Backblaze account.
    2. In the left navigation menu under B2 Cloud Storage, click Buckets.
    3. For the bucket in which you want to configure Lifecycle Rules, click Lifecycle Settings
    4. Select the lifecycle setting that applies to your bucket, or create custom lifecycle rules. For more information about these settings, see Lifecycle Rule File Versions
    5. Click Update Bucket.

    Delete Files Using Lifecycle Rules

    1. Sign in to your Backblaze account.
    2. In the left navigation menu under B2 Cloud Storage, click Buckets.
    3. For the bucket in which you want to delete files, click Lifecycle Settings
    4. Select Use custom lifecycle rules.
    5. To limit the files to a certain prefix, enter the prefix value in File Path. Otherwise leave the File Path field as the default value (if one exists).
    6. Set daysFromUploadingToHiding to 1, and set daysFromHidingToDeleting to 1.
    7. Click Update Bucket.

    All of the designated files are hidden after 24-48 hours, and they are deleted 24 hours after they are hidden. All files are deleted within 72 hours.


    Was this article helpful?