Introduction to obsutil
obsutil is a command line tool for accessing and managing OBS. 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 a good choice 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.
Operating System |
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 use these advanced functions on OBS Console.
Command Line Structure
The obsutil command line structures are as follows:
- In Windows
- In Linux or macOS
![](https://support.huaweicloud.com/intl/en-us/ae-ad-1-utiltg-obs/public_sys-resources/note_3.0-en-us.png)
- 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: 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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot