Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: weihongmin1 <weihongmin1@huawei.com> Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
10 KiB
obsutil Introduction
obsutil is a command line tool for accessing and managing OBS. You can use this tool to create buckets and upload, download, or delete files/folders. If you are familiar with the command line interface (CLI), obsutil is a good choice in batch processing and automatic tasks.
obsutil is compatible with Windows, Linux, and macOS. Table 1 lists the recommended operating system (OS) versions.
OS |
Recommended Version |
|---|---|
Windows |
|
Linux |
|
macOS |
macOS 10.13.4 |
Advantages
obsutil has the following advantages:
- Easy to use
- Lightweight and installation-free
- Compatible with Windows, Linux, and macOS
- Excellent performance and diversified configurations
Application Scenarios
- Automatic backup and archiving, for example, periodically uploading local data to OBS
- Operations that you cannot perform using other tools (like OBS Browser+). Such operations include synchronously uploading, downloading, and copying objects.
Functions
Table 2 lists the functions of obsutil.
Function |
Description |
|---|---|
Allows you to:
|
|
Allows you to upload, download, delete, and list objects. In detail, you can:
|
|
Provides logging on your client to record operations on buckets and objects for analysis. |
Command Line Structure
Below describes how to use commands in obsutil:
- Windows
- macOS or Linux
- command indicates the command to execute, for example, ls or cp.
- parameters indicates mandatory parameters, for example, the bucket name during bucket creation.
- options indicates optional parameters. They must start with a hyphen (-).
- Square brackets ([]) are not part of a command. Remove them before executing a specific command.
- You must escape special characters (including & < > and spaces) in a command using quotation marks. Single quotation marks are for Linux or macOS, and double quotation marks for Windows.
- You can pass additional parameters in the -key=value or -key value format, for example, -acl=private, or -acl private. Both formats are the same. Choose one as you like.
- In Windows, you can execute obsutil.exe to enter interactive mode. In this mode, you can run command [parameters...] [options...] where obsutil is not needed. Below gives an example:
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 log in to a remote macOS or Linux via SSH to use obsutil, set TMOUT to 0 to prevent obsutil from logging out due to SSH timeout.