Using BackBlaze B2 from Ubuntu 16.04 to Upload Files

  • $ sudo apt-get install python-pip
    $ sudo pip install --upgrade pip
    $ sudo pip install --upgrade b2

    This gives us the b2 command on Ubuntu. Now we can use this to talk to the B2 servers.

    $ b2 authorize_account youraccountid
    Backblaze application key: yourapplicationkeythatyougenerate
    $ b2 list_buckets

    This will list all of your current buckets. If you need to make a new bucket:

    $ b2 create_bucket myBucket allPublic

    What is returned is the bucket ID. Use your b2 list_buckets command again to see that your list has grown. We can use b2 ls to see that our bucket is empty, too.

    $ b2 ls myBucket

    Now that we have a bucket we can upload a file to it.

    $ b2 upload_file myBucket system.bak backups/system.bak

    That's it!