LinuxCommandLibrary

b2-tools

Access all features of Backblaze B2 Cloud Storage easily.

TLDR

Access your account

$ b2 authorize_account [key_id]
copy


List the existing buckets in your account
$ b2 list_buckets
copy


Create a bucket, provide the bucket name, and access type (e.g. allPublic or allPrivate)
$ b2 create_bucket [bucket_name] [allPublic|allPrivate]
copy


Upload a file. Choose a file, bucket, and a folder
$ b2 upload_file [bucket_name] [path/to/file] [folder_name]
copy


Upload a source directory to a Backblaze B2 bucket destination
$ b2 sync [path/to/source_file] [bucket_name]
copy


Copy a file from one bucket to another bucket
$ b2 copy-file-by-id [path/to/source_file_id] [destination_bucket_name] [path/to/b2_file]
copy


Show the files in your bucket
$ b2 ls [bucket_name]
copy


Remove a "folder" or a set of files matching a pattern
$ b2 rm [path/to/folder|pattern]
copy

Copied to clipboard