Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Managing Data in OBS

Updated on 2023-05-22 GMT+08:00

KooCLI has integrated the obsutil tool of Object Storage Service (OBS). You can run hcloud obs to manage your data in OBS.

Function Overview

With KooCLI, you can perform the following operations to manage your data in OBS.

Table 1 Integrated OBS functions in KooCLI

Function

Description

Basic bucket operations

Create buckets of different storage classes in specific regions, delete buckets, and obtain the bucket list and configuration information.

Basic object operations

Manage objects, including uploading, downloading, deleting, and listing objects.

  • Upload one or more files or folders.
  • Upload large files in multiple parts.
  • Synchronously upload, download, and copy incremental objects.
  • Copy a single object or copy multiple objects by name prefix.
  • Move a single object or move multiple objects by name prefix.
  • Resume failed upload, download, or copy tasks.

Logs

Configure logging on your client to record bucket and object operations for statistical analysis.

Initial Configuration

Before using KooCLI to manage data in OBS, configure OBS connection, including the OBS endpoint and access key (AK/SK). You can use KooCLI to manage OBS buckets and objects only after being authenticated by OBS.

  • Permanent AK/SK:
    hcloud obs config -i=ak -k=sk -e=endpoint
  • Temporary AK/SK and SecurityToken:
    hcloud obs config -i=ak -k=sk -t=token -e=endpoint

Checking Connectivity

After the configuration is complete, run the following command to check the connectivity:

hcloud obs ls -s

Check the configuration result based on the command output:

  • Bucket number: The configuration is correct.
  • Http status [403]: The access key is incorrect, or you do not have permission to access the bucket list. Analyze the root cause.
  • A connection attempt failed: OBS cannot be connected. Check the network condition.

Command Line Structure

The commands for managing OBS data with KooCLI have the following structure:

hcloud obs command [parameters...] [options...]

To enter the interactive mode in Windows:

  1. Run the following command to enter the interactive mode:

    hcloud obs

  2. Manage your OBS data with commands in the following structure:

    command [parameters...] [options...]

    For example:

    hcloud obs
    Enter "exit" or "quit" to logout
    Enter "help" or "help command" to show help docs
    Input your command:
    -->ls -limit=3 -s
    obs://bucket-001
    obs://bucket-002
    obs://bucket-003
    Bucket number: 3

NOTE:
  • command indicates the command to be executed, for example, ls or cp.
  • parameters indicates the basic parameters (mandatory) of the command, for example, name of a bucket to be created.
  • options indicates additional parameters (optional) of the command. Additional parameters must be preceded with a hyphen (-) when you run the command. Enter a parameter in the -key=value or -key value format, for example, -acl=private or -acl private. There is no difference between the two formats. Select either one as you like.
  • The brackets ([]) are not part of the command. Do not enclose parameter values with brackets when entering a command.
  • If the command contains special characters such as ampersands (&), angle brackets (<>), and spaces, escape these parameters using single quotation marks (Linux and macOS) or quotation marks (Windows).

The following table lists the OBS operation commands supported by KooCLI. The parameters of each command are the same as those in obsutil. For details about these parameters, see Bucket Commands, Object Commands, and Auxiliary Commands.

Table 2 OBS operation commands supported by KooCLI

Category

Command

Function

Description

Command Line Structure

Bucket commands

mb

Create bucket

Create a bucket with a unique name. Each account can create a maximum of 100 buckets.

hcloud obs mb obs://bucket [-fs] [-az=xxx] [-acl=xxx] [-sc=xxx] [-location=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

ls

List buckets

Obtain the bucket list. The buckets are displayed in lexicographical order of their names.

hcloud obs ls [-s] [-du] [-sc] [-j=1] [-limit=1] [-format=default] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

stat

Query bucket properties

Query the basic properties of a bucket, including the default storage class, region, version, support for POSIX, AZ, number of objects, storage usage, and bucket quota.

hcloud obs stat obs://bucket [-acl] [-bf=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

chattri

Set bucket properties

Set the properties of a bucket, including storage classes and access policies.

hcloud obs chattri obs://bucket [-sc=xxx] [-acl=xxx] [-aclXml=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

rm

Delete bucket

Delete a bucket that contains no objects, historical versions, or fragments.

hcloud obs rm obs://bucket [-f] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

bucketpolicy

Configure bucket policy

Configure a bucket policy.

hcloud obs bucketpolicy obs://bucket -method=put -localfile=xxx [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Obtain bucket policy

Obtain a bucket policy.

hcloud obs bucketpolicy obs://bucket -method=get [-localfile=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Delete bucket policy

Delete a bucket policy.

hcloud obs bucketpolicy obs://bucket -method=delete [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Object commands

mkdir

Create folder

Create a folder in a specified bucket or the local file system.

  • Create a folder in a specified bucket.
    hcloud obs mkdir obs://bucket/folder[/subfolder1/subfolder2] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Create a folder in the local file system.
    hcloud obs mkdir folder_url [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

cp

Upload object

Upload one or more local files or folders to a specified path in OBS. These files can be texts, images, or videos.

  • Upload a file.
    hcloud obs cp file_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=5248800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-o=xxx] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Upload a folder.
    hcloud obs cp folder_url obs://bucket[/key] -r [-arcDir=xxx] [-dryRun] [-link] [-f] [-flat] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Upload multiple files and folders.
    hcloud obs cp file1_url,folder1_url|filelist_url obs://bucket[/prefix] -msm=1 [-r] [-arcDir=xxx] [-dryRun] [-link] [-f] [-u] [-vlength] [-vmd5] [-flat] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx][-timeRange=time1-time2] [-at] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Copy object

Copy a single object or copy multiple objects with a specified name prefix.

  • Copy a single object.
    hcloud obs cp obs://srcbucket/key obs://dstbucket/[dest] [-dryRun][-u] [-crr] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-versionId=xxx] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Copy multiple objects.
    hcloud obs cp obs://srcbucket[/key] obs://dstbucket[/dest] -r [-dryRun][-f] [-flat] [-u] [-crr] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Download object

Download an object or download multiple objects with a specified name prefix to your local PC.

  • Download a single object.
    hcloud obs cp obs://bucket/key file_or_folder_url [-tempFileDir=xxx] [-dryRun] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-versionId=xxx] [-ps=auto] [-cpd=xxx][-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Download multiple objects.
    hcloud obs cp obs://bucket[/key] folder_url -r [-tempFileDir=xxx] [-dryRun] [-f] [-flat] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Resume failed upload task

Resume a failed upload task based on the task ID.

hcloud obs cp -recover=xxx [-arcDir=xxx] [-dryRun] [-f] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-clear] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Resume failed copy task

Resume a failed copy task based on the task ID.

hcloud obs cp -recover=xxx [-dryRun] [-f] [-u] [-crr] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-clear] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Resume failed download task

Resume a failed download task based on the task ID.

hcloud obs cp -recover=xxx [-dryRun] [-tempFileDir=xxx] [-f] [-u] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-clear] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

stat

Query object properties

Query the basic properties of an object.

hcloud obs stat obs://bucket/key [-acl][-bf=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

chattri

Set object properties

Set properties of a single object or of multiple objects with a specified name prefix.

  • Set properties of a single object.
    hcloud obs chattri obs://bucket/key [-sc=xxx] [-acl=xxx] [-aclXml=xxx] [-versionId=xxx] [-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Set properties of multiple objects.
    hcloud obs chattri obs://bucket[/key] -r [-f] [-v] [-sc=xxx] [-acl=xxx] [-aclXml=xxx] [-o=xxx] [-j=1] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

ls

List objects

Query objects or object versions in a bucket. All objects are displayed in lexicographical order of their names or versions.

hcloud obs ls obs://bucket[/prefix] [-s] [-d] [-v] [-du] [-marker=xxx] [-versionIdMarker=xxx] [-bf=xxx] [-limit=1] [-format=default] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

List multipart upload tasks

Query multipart upload tasks in a bucket.

hcloud obs ls obs://bucket[/prefix] [-s] [-d] -m [-a] [-uploadIdMarker=xxx] [-marker=xxx] [-limit=1] [-format=default] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

mv

Move object

Move a single object or move multiple objects with a specified name prefix.

  • Move a single object.
    hcloud obs mv obs://srcbucket/key obs://dstbucket/[dest] [-dryRun] [-u] [-p=1] [-threshold=52428800] [-versionId=xxx] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Move multiple objects.
    hcloud obs mv obs://srcbucket[/key] obs://dstbucket[/dest] -r [-dryRun] [-f] [-flat] [-u] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

sign

Generate object download link

Generate a download link for a specified object in a bucket or generate download links for multiple objects with a specified name prefix in a bucket.

  • Generate a download link for a single object.
    hcloud obs sign obs://bucket/key [-e=300] [-config=xxx] [-endpoint=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Generate download links for multiple objects with a specified name prefix.
    hcloud obs sign obs://bucket[/key] -r [-e=300] [-timeRange=time1-time2] [-include=*.xxx] [-exclude=*.xxx] [-o=xxx] [-config=xxx] [-endpoint=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

rm

Delete object

  • Delete a specified object.
  • Delete multiple objects with a specified name prefix.
  • Delete a single object.
    hcloud obs rm obs://bucket/key [-f] [-versionId=xxx] [-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Delete multiple objects.
    hcloud obs rm obs://bucket/[key] -r [-j=1] [-f] [-v] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

sync

Synchronously upload incremental objects

Synchronize all content in a local source path to a specified target OBS bucket to keep data consistency. Incremental synchronization has the following meanings:

  1. Increment: Compare the source files with the target objects and upload only the source files that have changed.
  2. Synchronization: After the command is executed, ensure that the local source path is a subset of the target bucket on OBS. That is, any file in the local source path has its corresponding object in the target bucket on OBS.
  • Upload a file synchronously.
    hcloud obs sync file_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-vlength] [-vmd5] [-p=1] [-threshold=5248800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-o=xxx] [-cpd=xxx] [-fr] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Upload a folder synchronously.
    hcloud obs sync folder_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-at] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Synchronously copy incremental objects

Synchronize all objects in a specified path of the source bucket to a specified path in the destination bucket to keep data consistency. Incremental synchronization has the following meanings:

  1. Increment: Compare the source and target objects and copy only the source objects that have changed.
  2. Synchronization: After the command is executed, ensure that the specified path of the source bucket is a subset of the specified path in the target bucket. That is, any object in the specified path of the source bucket has its corresponding object in the target bucket.
hcloud obs sync obs://srcbucket[/key] obs://dstbucket[/dest] [-dryRun] [-crr] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Synchronously download incremental objects

Synchronize all objects in a specified path of the source OBS bucket to a target local path to keep data consistency. Incremental synchronization has the following meanings:

  1. Increment: Compare the source objects with the target files and download only the source objects that have changed.
  2. Synchronization: After the command is executed, ensure that the specified path of the source bucket is a subset of the target local path. That is, any object in the specified path of the source bucket has its corresponding file in the target local path.
hcloud obs sync obs://bucket[/key] folder_url [-tempFileDir=xxx] [-dryRun] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

restore

Restore objects from OBS archive

Restore a specified object whose storage class is cold or restore multiple objects with a specified name prefix.

  • Restore a single object.
    hcloud obs restore obs://bucket/key [-d=1] [-t=xxx] [-versionId=xxx] [-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-token=xxx]
  • Restore multiple objects.
    hcloud obs restore obs://bucket[/key] -r [-f] [-v] [-d=1] [-t=xxx] [-o=xxx] [-j=1] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-token=xxx]
  • Restore all objects in a specified directory.
    hcloud obs restore obs://bucket/folder/ -r [-f] [-v] [-d=1] [-t=xxx] [-o=xxx] [-j=1] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-token=xxx]

abort

Delete multipart upload task

  • Delete a multipart upload task of a specified ID in a specified bucket.
  • Delete multiple multipart upload tasks with a specified name prefix.
  • Delete a single multipart upload task.
    hcloud obs abort obs://bucket/key -u=xxx [-f] [-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Delete multiple multipart upload tasks.
    hcloud obs abort obs://bucket[/key] -r [-f] [-o=xxx] [-j=1] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

create-share

Create authorization code for directory sharing

Create an authorization code for directory sharing by specifying a bucket name, object name prefix, and access code.

hcloud obs create-share obs://bucket[/prefix] [-ac=xxx] [-vp=xxx] [-dst=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

share-ls

List objects by using authorization code

Query objects in a bucket with an authorization code. The returned objects are displayed in lexicographical order of their names.

  • Enter an authorization code directly.
    hcloud obs share-ls authorization_code [-ac=xxx] [-prefix=xxx] [-s] [-d] [-marker=xxx] [-bf=xxx] [-limit=1] [-format=default] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Pass an authorization code through a file path.
    hcloud obs share-ls file://authorization_code_file_url [-ac=xxx] [-prefix=xxx] [-s] [-d] [-marker=xxx] [-bf=xxx] [-limit=1] [-format=default] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

share-cp

Download objects by using authorization code

Download a single object or download multiple objects with a specified name prefix to your local PC by using an authorization code.

  • Download a single object by directly entering an authorization code.
    hcloud obs share-cp authorization_code file_or_folder_url -key=xxx [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-ps=auto] [-cpd=xxx][-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Download a single object by passing an authorization code through a file path.
    hcloud obs share-cp file://authorization_code_file_url file_or_folder_url -key=xxx [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-u] [-vlength] [-vmd5] [-p=1] [-threshold=52428800] [-ps=auto] [-cpd=xxx][-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Download multiple objects by directly entering an authorization code.
    hcloud obs share-cp authorization_code folder_url -r [-key=xxx] [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-f] [-u] [-vlength] [-vmd5] [-flat] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Download multiple objects by passing an authorization code through a file path.
    hcloud obs share-cp file://authorization_code_file_url folder_url -r [-key=xxx] [-ac=xxx] [-dryRun] [-tempFileDir=xxx] [-f] [-u] [-vlength] [-vmd5] [-flat] [-j=1] [-p=1] [-threshold=52428800] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Auxiliary commands

config

Update configuration file

Update some items in the .obsutilconfig file, including the endpoint, AK, SK, and token.

For details about the parameters in .obsutilconfig, see Parameter Description.

  • Update configurations in interactive mode
    hcloud obs config [-interactive] [-crr] [-config=xxx]
  • Directly update configurations.
    hcloud obs config [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx] [-crr] [-config=xxx]

clear

Delete part records

Delete part records from a specified directory.

hcloud obs clear [checkpoint_dir] [-u] [-d] [-c] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

help

View command help information

View the supported OBS commands or the help information of a specific command.

hcloud obs help [command]

version

View version

View the version of the integrated obsutil.

hcloud obs version

archive

Archive log files

Archive log files to a local PC or to a specified bucket.

  • Archive to a local PC.
    hcloud obs archive [file_or_folder_url] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • Archive to a specified bucket.
    hcloud obs archive obs://bucket[/key] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

ls

List failure result files

List the last modified failure result files generated by the cp or sync commands in a specified folder.

hcloud obs ls -failed [-limit=1000] [-o=xxx]

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback