How to use s5cmd with B2

s5cmd is a free open source tool that supports a wide range of object management tasks both for cloud storage services, and local filesystems. It also supports parallel tasking and multiple threads for very fast throughput.

 

s5cmd can be configured with B2 by following the steps below.

 

Step 1:

Create a directory that will contain your credentials file.

 

mkdir ~/.aws

 

Step 2:

Create your credentials file, and enter your Key ID and Application Key (App Keys) in the format shown below.

 

 

vi ~/.aws/credentials

 

Enter the following information and then save and exit.

[default]

aws_access_key_id = 9xxxxxxxxxxx00000000003

aws_secret_access_key = Kyyyyyyyyyyy00000g

 

 

Step 3:

Example usage. 

Note: The endpoint URL must be specified on each command, or you can set up a system alias that includes it automatically.

 

List all buckets.

s5cmd -endpoint-url http://s3.us-west-002.backblazeb2.com ls

 

List contents of a bucket.

s5cmd -endpoint-url http://s3.us-west-002.backblazeb2.com ls s3://mydatabucket-1/

 

Copy a local file into a bucket.

s5cmd -endpoint-url http://s3.us-west-002.backblazeb2.com cp my-pets2020.jpg s3://mydatabucket-1/

 

 

 

 

 

The S3 Compatible API for Backblaze B2 Cloud Storage allows 1000’s of integrations to work with B2 natively. If you’re new to the S3 Compatible API, please see our Getting Started Guide. If you have any trouble using s5cmd with B2, please let us know by emailing us at b2feedback@backblaze.com.

 

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk