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, and uploading, downloading, and deleting files/folders. If you are familiar with the command line interface (CLI), obsutil can bring you better experience in batch processing and automated tasks.
obsutil is compatible with Windows, Linux, and macOS operating systems (OSs). Table 1 lists the recommended OS versions. To obtain the obsutil download links for different OSs, refer to Downloading and Installing obsutil.
OS |
Recommended Version |
---|---|
Windows |
|
Linux |
|
macOS |
macOS 10.13.4 |
Advantages
obsutil features the following advantages:
- Simple and easy to use
- Lightweight and installation-free
- Compatible with Windows, Linux, and macOS
- Diversified configurations and excellent performance
Application Scenarios
- Automated backup and archiving, for example, periodically uploading local data to OBS
- Scenarios where other tools (like OBS Browser+) cannot be used, such as 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:
|
|
Configure logging on your client to record bucket and object operations for statistical analysis. |
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
- command indicates the command to be executed, for example, ls or cp.
- parameters indicates the mandatory parameters of the command, for example, the bucket name during bucket creation.
- 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