forked from docs/doc-exports
OBS Util 0115 Version
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: weihongmin1 <weihongmin1@huawei.com> Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
This commit is contained in:
72
docs/obs/tool-obsutil/obs_11_0045.html
Normal file
72
docs/obs/tool-obsutil/obs_11_0045.html
Normal file
@ -0,0 +1,72 @@
|
||||
<a name="obs_11_0045"></a><a name="obs_11_0045"></a>
|
||||
|
||||
<h1 class="topictitle1">Archiving Log Files</h1>
|
||||
<div id="body1547106819232"><div class="section" id="obs_11_0045__section1479112110815"><h4 class="sectiontitle">Function</h4><p id="obs_11_0045__p11772825481">You can use this command to archive log files to a local PC or to a specified bucket.</p>
|
||||
</div>
|
||||
<div class="section" id="obs_11_0045__section1220752192216"><h4 class="sectiontitle">Command Line Structure</h4><ul id="obs_11_0045__ul10922428121013"><li id="obs_11_0045__li79221528121010">In Windows<ul id="obs_11_0045__ul48751720253"><li id="obs_11_0045__li1012518598242">Archiving to a local PC<pre class="screen" id="obs_11_0045__screen10125859132415">obsutil archive [file_or_folder_url] [-config=xxx] </pre>
|
||||
</li><li id="obs_11_0045__li162401213162513">Archiving to a specified bucket<pre class="screen" id="obs_11_0045__screen13477182952517">obsutil archive obs://bucket[/key] [-config=xxx] </pre>
|
||||
</li></ul>
|
||||
</li><li id="obs_11_0045__li106087324101">In Linux or macOS<ul id="obs_11_0045__ul540412358913"><li id="obs_11_0045__li12404163514917">Archiving to a local PC<pre class="screen" id="obs_11_0045__screen204052351997">obsutil archive [file_or_folder_url] [-config=xxx] </pre>
|
||||
</li><li id="obs_11_0045__li040683511913">Archiving to a specified bucket<pre class="screen" id="obs_11_0045__screen740612351992">obsutil archive obs://bucket[/key] [-config=xxx] </pre>
|
||||
</li></ul>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div class="section" id="obs_11_0045__section148621021184511"><h4 class="sectiontitle">Examples</h4><ul id="obs_11_0045__ul12862192116453"><li id="obs_11_0045__li886242124513">Take the Windows OS as an example. Run the <strong id="obs_11_0045__b369616289395">obsutil archive</strong> command to archive log files to the same directory where the tool is executed.<pre class="screen" id="obs_11_0045__screen9862132144515"><strong id="obs_11_0045__b6862142115450">obsutil <strong id="obs_11_0045__b78628212456">archive</strong></strong>
|
||||
|
||||
[----------------------------------------------------------] 100.00% 15/15 35ms
|
||||
Succeed to archive log files to [D:\obsutil\obsutil_log.zip]</pre>
|
||||
</li></ul>
|
||||
</div>
|
||||
<div class="section" id="obs_11_0045__section6559191102418"><h4 class="sectiontitle">Parameter Description</h4>
|
||||
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_11_0045__table10831182114445" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_11_0045__row683212154419"><th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.2.1.4.1.1"><p id="obs_11_0045__p118329219446">Parameter</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.2.1.4.1.2"><p id="obs_11_0045__p15137125919108">Optional or Mandatory</p>
|
||||
</th>
|
||||
<th align="left" class="cellrowborder" valign="top" width="59%" id="mcps1.3.4.2.1.4.1.3"><p id="obs_11_0045__p12832121184414">Description</p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody><tr id="obs_11_0045__row108328217449"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0045__p64495172515">file_or_folder_url</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0045__p154316502519">Optional</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0045__p17425512259">The path to which log files are archived. The rules are as follows:</p>
|
||||
<ul id="obs_11_0045__ul105928456532"><li id="obs_11_0045__li232373132116">If this parameter is left blank, log files are archived to the same directory where obsutil commands reside with <strong id="obs_11_0045__b1549218199916">obsutil_log.zip</strong> as the archive file name.</li><li id="obs_11_0045__li18704181916135">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 <strong id="obs_11_0045__b19182195312314">obsutil_log.zip</strong> as the archive file name.</li><li id="obs_11_0045__li1230573911153">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.</li><li id="obs_11_0045__li4953132119137">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.</li><li id="obs_11_0045__li1759284518535">If this parameter specifies an existing folder, then log files are archived to the specified directory with <strong id="obs_11_0045__b94473916314">obsutil_log.zip</strong> as the archive file name.</li></ul>
|
||||
<div class="note" id="obs_11_0045__note2947114643"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0045__p394734546">All archive files are .zip files.</p>
|
||||
</div></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_11_0045__row1583413141821"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0045__p154092113211">bucket</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0045__p105401120328">Mandatory for archiving log files to a specified bucket</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0045__p1954062113212">The bucket name</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_11_0045__row941361618217"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0045__p13233171113215">key</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0045__p152331511173216">Optional for archiving log files to a specified bucket</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0045__p16965474526">The object name or object name prefix when archiving log files to a specified bucket</p>
|
||||
<p id="obs_11_0045__p060018221533">The rules are as follows:</p>
|
||||
<ul id="obs_11_0045__ul7190122515538"><li id="obs_11_0045__li8801747252">If this parameter is left blank, log files are archived to the root directory of the bucket with <strong id="obs_11_0045__b4475192719426">obsutil_log.zip</strong> as the object name.</li><li id="obs_11_0045__li15190225135311">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 <strong id="obs_11_0045__b1248317223469">obsutil_log.zip</strong>. Otherwise, log files are archived with the value as the object name.</li></ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="obs_11_0045__row3739132910383"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0045__p153951131317">config</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0045__p12395135316">Optional (additional parameter)</p>
|
||||
</td>
|
||||
<td class="cellrowborder" valign="top" width="59%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0045__p43952034313">The user-defined configuration file for executing a command. For details about parameters that can be configured, see <a href="obs_11_0035.html">Configuration Parameters</a>.</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="familylinks">
|
||||
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_11_0022.html">Auxiliary Commands</a></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user