Use Huawei cloud object storage with obsutil tool
1 min read

Use Huawei cloud object storage with obsutil tool

Use Huawei cloud object storage with obsutil tool
Photo by Kevin Horvat / Unsplash

This article are showing setup obsutil to working with Huawei cloud object storage (OBS) and simple usage

huawei cloud service tools
  • # tar xzf obsutil_linux_amd64.tar.gz
  • # cd obsutil_linux_amd64_5.3.4/
extract obsutil tool
  • # source  setup.sh obsutil
setup.sh
  • find OBS endpoint from https://developer.huaweicloud.com/intl/en-us/endpoint?OBS

    example:
    AP-Bangkok use obs.ap-southeast-2.myhuaweicloud.com
  • edit .obsutilconfig
    # nano /root/.obsutilconfig
    endpoint=http://your-endpoint
    ak=*** Provide your Access Key ***
    sk=*** Provide your Secret Key ***


    example:
    endpoint=https://obs.ap-southeast-2.myhuaweicloud.com
    ak=123abc!@#
    sk=123abc!@#
  • test with command
    # obsutil ls -s
  • sample usage
  • upload files
    obsutil cp /root/sample/test.txt obs://bucket-test/key
  • upload folder
    obsutil cp /root/sample obs://bucket-test -f -r