1.安裝obsutil
obsutil是一款用於訪問管理華為雲物件儲存服務(Object Storage Service,OBS)的命令列工具
https://support.huaweicloud.com/utiltg-obs/obs_11_0003.html
#下載obsutiltar包 wget https://obs-community.obs.cn-north-1.myhuaweicloud.com/obsutil/current/obsutil_linux_amd64.tar.gz #解壓 tar -xzvf obsutil_linux_amd64.tar.gz #進入目錄 cd /data/obs/obsutil_linux_amd64_5.5.12 #新增許可權 chmod 755 obsutil #測試版本 ./obsutil version
2.在伺服器使用Cli的方式登入,在配置的時候,配置ak/sk
./obsutil config -i=ak -k=sk -e=obs.cn-north-xx.xx.com
3.使用sync同步上傳,其中桶名為gw-bjs-dev-bom
https://support.huaweicloud.com/utiltg-obs/obs_11_0042.html
./obsutil sync /data/nfs-bom/ obs://gw-bjs-dev-bom