Introduction to obsutil
obsutil is a command line tool for accessing and managing OBS on HUAWEI CLOUD. You can use this tool to perform common configurations on OBS, such as creating buckets, uploading and downloading files/folders, and deleting files/folders. If you are familiar with command line interface (CLI), obsutil is recommended for batch processing and automated tasks.
obsutil is compatible with the Windows, Linux, and macOS operating systems (OSs). Table 1 lists the recommended OS versions. To obtain the obsutil download links and methods for different OSs, refer to Downloading obsutil.
| OS | Recommended Version |
|---|---|
| Windows |
|
| Linux |
|
| macOS | macOS 10.13.4 |
Tool Advantages
obsutil features the following advantages:
- Simple and easy to use
- Lightweight and installation-free
- Compatible with Windows, Linux, and macOS operating systems
- Diversified configurations and excellent performance
Application Scenarios
- Automated backup and archiving, for example, periodically uploading local data to OBS.
- Scenarios that cannot be implemented using other tools such as OBS Browser+, for example, synchronously uploading, downloading, and copying objects.
Functions
Table 2 lists obsutil functions.
| Function | Description |
|---|---|
| Create buckets of different storage classes in specific regions, delete buckets, and obtain the bucket list and configuration information. | |
| Manage objects, including uploading, downloading, deleting, and listing objects. Supported operations are detailed as follows:
| |
| Allows you to configure logging on the client side to record operations on buckets and objects for statistics analysis later. |
Advanced bucket and object management operations are being developed continuously, and will be available in later versions of obsutil. You can also go to OBS Console and explore more. For details, see Object Storage Service Console Operation Guide.
Command Line Structure
The obsutil command line structures are as follows:
- In Windows
- In Linux or macOS
- command indicates the command to be executed, for example, ls or cp.
- parameters indicates the basic parameters (mandatory) of the command, for example, bucket name when creating a bucket.
- options indicates the additional parameters (optional) of the command. Additional parameters must be preceded with a hyphen (-) when you run the command.
- The square brackets ([]) are not part of the command. Do not enclose parameter values with them when entering a command.
- If the command contains special characters including ampersands (&), angle brackets (<) and (>), and spaces, they need to be escaped using quotation marks. Use single quotation marks for Linux or macOS and quotation marks for Windows.
- Additional parameters can be input 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.
- In Windows, you can directly execute obsutil.exe to enter an interactive command mode. In this mode, you can input command [parameters...] [options...] without obsutil to run a command. An example is provided as follows:
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 is: 3 Input your command: -->
- If you use SSH to remotely log in to the Linux or macOS for running obsutil commands, you are advised to set TMOUT=0 to prevent the program from exiting due to the expiration of the SSH session.
Next Article: Download and Installation
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.