Note
Event Notifications feature is now in Private Preview. See https://www.backblaze.com/blog/announcing-event-notifications/ for details.
Overview
This program provides command-line access to the B2 service.
There are two flows of authorization:
call
b2 account authorizeand have the credentials cached in sqliteset
B2_APPLICATION_KEY_IDandB2_APPLICATION_KEYenvironment variables when running this program
This program caches authentication-related and other data in a local SQLite database. The location of this database is determined in the following way:
If --profile arg is provided:
XDG_CONFIG_HOME/b2/db-<profile>.sqlite, ifXDG_CONFIG_HOMEenv var is set~/.b2db-{profile}.sqlite
Otherwise:
B2_ACCOUNT_INFOenv var’s value, if set~/.b2_account_info, if it existsXDG_CONFIG_HOME/b2/account_info, ifXDG_CONFIG_HOMEenv var is set~/.b2_account_info, as default
If the directory XDG_CONFIG_HOME/b2 does not exist (and is needed), it is created.
Please note that the above rules may be changed in next versions of b2sdk, and in order to get
reliable authentication file location you should use b2 account get.
Control characters escaping is turned on if running under terminal. You can override it by explicitly using –escape-control-chars/–no-escape-control-chars` option, or by setting B2_ESCAPE_CONTROL_CHARACTERS environment variable to either 1 or 0.
You can suppress command stdout & stderr output by using --quiet option.
To supress only progress bar, use --no-progress option.
For more details on one command:
b2 <command> --help
When authorizing with application keys, this tool requires that the key
have the listBuckets capability so that it can take the bucket names
you provide on the command line and translate them into bucket IDs for the
B2 Storage service. Each different command may required additional
capabilities. You can find the details for each command in the help for
that command.
A string provided via an optional environment variable B2_USER_AGENT_APPEND
will be appended to the User-Agent.
Documentation index
- Quick Start Guide
- Commands
- account authorize
- account clear
- account get
- bucket create
- bucket delete
- bucket get
- bucket get-download-auth
- bucket list
- bucket notification-rule create
- bucket notification-rule delete
- bucket notification-rule disable
- bucket notification-rule enable
- bucket notification-rule list
- bucket notification-rule update
- bucket update
- file cat
- file copy-by-id
- file download
- file hide
- file info
- file large parts
- file large unfinished cancel
- file large unfinished list
- file update
- file upload
- file url
- install-autocomplete
- key create
- key delete
- key list
- license
- ls
- replication delete
- replication pause
- replication setup
- replication status
- replication unpause
- rm
- sync
- version
- Replication