Create a Lifecycle Rule with the CLI
    • Dark
      Light

    Create a Lifecycle Rule with the CLI

    • 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 use Lifecycle Rules with the Backblaze B2 Cloud Storage command-line interface (CLI), you need to run version 0.7.0 of the Backblaze B2 command-line tool.

    Use the following commands to create and manage Lifecycle Rules in the CLI.

    b2 create-bucket [–bucketInfo <json>] [–lifecycleRules <json>] <bucketName> [allPublic | allPrivate]
    b2 update-bucket [–bucketInfo <json>] [–lifecycleRules <json>] <bucketName> [allPublic | allPrivate]
    b2 get-bucket <bucketName>

    The b2 get-bucket command returns all of the variables for the named bucket.


    Was this article helpful?