← 返回命令列表

Linux command

b2 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Authorize

b2 authorize-account [applicationKeyId] [applicationKey]

Upload

b2 upload-file [bucketName] [localFile] [remoteFileName]

Download

b2 download-file-by-name [bucketName] [fileName] [localFile]

List

b2 list-buckets

Sync

b2 sync [localPath] b2://[bucketName]/[path]

说明

b2 is the command-line interface for Backblaze B2 Cloud Storage. It provides tools for uploading, downloading, and managing files in B2 buckets, offering S3-compatible object storage at lower costs. The tool supports large file uploads, versioning, and lifecycle rules.

参数

authorize-account
Authenticate with application key
upload-file
Upload single file
download-file-by-name
Download file by name
list-buckets
List all buckets
list-file-names
List files in bucket
sync
Synchronize directories
delete-file-version
Delete specific file version
create-bucket
Create new bucket
--threads _num_
Number of parallel threads
--noProgress
Disable progress display

FAQ

What is the b2 command used for?

b2 is the command-line interface for Backblaze B2 Cloud Storage. It provides tools for uploading, downloading, and managing files in B2 buckets, offering S3-compatible object storage at lower costs. The tool supports large file uploads, versioning, and lifecycle rules.

How do I run a basic b2 example?

Run `b2 authorize-account [applicationKeyId] [applicationKey]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does authorize-account do in b2?

Authenticate with application key