gsutil With Wasabi
    • 19 Jun 2024
    • 1 Minute to read
    • PDF

    gsutil With Wasabi

    • PDF

    Article summary

    How do I use gsutil with Wasabi?

    >gsutil is Google Cloud Storage's command line tool to access the cloud resources. gsutil has an in-built configuration to access Amazon S3 buckets. This configuration can be used to point the storage host to Wasabi servers as a means of allow you to use gsutil with Wasabi. 

    Steps:

    1. Install gsutil. Follow all the instructions provided on the documentation page

    2. Edit the ~/.boto file to provide Wasabi Access keys and Wasabi endpoint

    3. Under the [Credentials] section of the file make the below changes

    Uncomment 'aws_access_key_id' , 'aws_secret_access_key', 's3_host' parameters and provide the below values:

    
    # To add HMAC aws credentials for "s3://" URIs, edit and uncomment the
    # following two lines:
    aws_access_key_id = 
    aws_secret_access_key = 
    # The ability to specify an alternate storage host and port
    # is primarily for cloud storage service developers.
    # Setting a non-default gs_host only works if prefer_api=xml.
    s3_host = s3.wasabisys.com
    #s3_port = 
    1. Sample commands:

        List files in bucket: 

               gsutil ls s3://

        Write file from local directory to bucket: 

               gsutil cp /  s3://

        Read file from bucket to local directory: 

               gsutil cp s3:////  /

    Note that this example discusses the use of Wasabi's us-east-1 storage region. To use other Wasabi storage regions, please use the appropriate Wasabi service URL as described in this article.