How to Upload Files to Backblaze B2 with CLI

What you’ll need:

Finding your B2 account ID and application key

  1. Log into your Backblaze B2 account.
  2. Click on My Account in the top right of the window.

  3. Click on Show Account ID and Application Key.

  4. Copy your account ID into a text editor.
  5. Scroll down to the Add Application Key section of the pop-up window.

  6. Enter a name, and select any restrictions that you need. FileZilla Pro Command Line
    will need read and write permissions for at least one bucket.

  7. Click on Create Application Key.

    The Backblaze B2 website will create a new application key for FileZilla Pro Command
    Line to use.
  8. Scroll down to the Your Application Keys section of the pop-up window. You should
    see a Success! message just above it.

  9. Copy the new application key into a text editor.

Connecting to B2Connecting to B2

Use the b2 protocol and connect to the api.backblazeb2.com host:

    From the prompt enter the connect command:

      fzcli> connect b2://<account ID:<application key>@api.
      ˓→backblazeb2.com<path>

    Optionally you can use the parameters of the connect command:

      fzcli> connect --protocol b2 --user <account ID>
      --pass <application key> --path <path> api.backblazeb2.com

    Note that the path is optional but if present it has to start with a slash.

You can now transfer files between your local machine and your Backblaze B2 account.