Archiving Log Files
Function
You can use this command to archive log files to a local PC or to a specified bucket.
Command Line Structure
- In Windows
- Archiving to a local PC
obsutil archive [file_or_folder_url] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
- Archiving to a specified bucket
obsutil archive obs://bucket[/key] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
- Archiving to a local PC
- In Linux or macOS
- Archiving to a local PC
obsutil archive [file_or_folder_url] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
- Archiving to a specified bucket
obsutil archive obs://bucket[/key] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
- Archiving to a local PC
Examples
- Take the Windows OS as an example. Run the obsutil archive command to archive log files to the same directory where the tool is executed.
obsutil archive [----------------------------------------------------------] 100.00% 15/15 35ms Succeed to archive log files to [D:\obsutil\obsutil_log.zip]
Parameter Description
Parameter | Optional or Mandatory | Description |
|---|---|---|
file_or_folder_url | Optional | The path to which log files are archived. The rules are as follows:
NOTE: All archive files are .zip files. |
bucket | Mandatory for archiving log files to a specified bucket | The bucket name |
key | Optional for archiving log files to a specified bucket | The object name or object name prefix when archiving log files to a specified bucket The rules are as follows:
|
config | Optional (additional parameter) | The user-defined configuration file for executing a command. For details about parameters that can be configured, see Configuration Parameters. |
e | Optional (additional parameter) | The endpoint |
i | Optional (additional parameter) | The user's AK |
k | Optional (additional parameter) | The user's SK |
t | Optional (additional parameter) | The user's security token |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.

