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

Examples

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:

  • If this parameter is left blank, log files are archived to the same directory where obsutil commands reside with obsutil_log.zip as the archive file name.
  • If this parameter specifies a file or folder path that does not exist, the tool checks whether the value ends with a slash (/) or backslash (\). If yes, a folder is created based on the path, and log files are archived to the newly created directory with obsutil_log.zip as the archive file name.
  • If this parameter specifies a file or folder path that does not exist and the value does not end with a slash (/) or backslash (\), log files are archived to a local PC with the value as the archive file name.
  • If this parameter specifies an existing .zip file, then log files are archived to a local PC overwriting the existing file, with the value as the archive file name.
  • If this parameter specifies an existing folder, then log files are archived to the specified directory with obsutil_log.zip as the archive file name.
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:

  • If this parameter is left blank, log files are archived to the root directory of the bucket with obsutil_log.zip as the object name.
  • If the value ends with a slash (/), the value is used as the object name prefix when archiving log files, and the object name is the value plus obsutil_log.zip. Otherwise, log files are archived with the value as the object name.

config

Optional (additional parameter)

The user-defined configuration file for executing a command. For details about parameters that can be configured, see Configuration Parameters.