[#13] Add 'info' command for the FrostFS backend #17

Merged
alexvanin merged 2 commits from KurlesHS/rclone:feat/frostfs_info_cmd into tcl/master 2025-02-24 14:35:30 +00:00
8 changed files with 762 additions and 85 deletions

211
MANUAL.html generated
View file

@ -233,7 +233,7 @@
<header id="title-block-header"> <header id="title-block-header">
<h1 class="title">rclone(1) User Manual</h1> <h1 class="title">rclone(1) User Manual</h1>
<p class="author">Nick Craig-Wood</p> <p class="author">Nick Craig-Wood</p>
<p class="date">Jan 23, 2025</p> <p class="date">Feb 22, 2025</p>
</header> </header>
<h1 id="rclone-syncs-your-files-to-cloud-storage">Rclone syncs your <h1 id="rclone-syncs-your-files-to-cloud-storage">Rclone syncs your
files to cloud storage</h1> files to cloud storage</h1>
@ -19294,7 +19294,7 @@ split into groups.</p>
--tpslimit float Limit HTTP transactions per second to this --tpslimit float Limit HTTP transactions per second to this
--tpslimit-burst int Max burst of transactions for --tpslimit (default 1) --tpslimit-burst int Max burst of transactions for --tpslimit (default 1)
--use-cookies Enable session cookiejar --use-cookies Enable session cookiejar
--user-agent string Set the user-agent to a specified string (default &quot;rclone/v1.68.2-beta.8335.a85292ca0.feature/add-container-zones-support&quot;)</code></pre> --user-agent string Set the user-agent to a specified string (default &quot;rclone/v1.68.2-beta.8339.71f0cdbd4.feat/frostfs_info_cmd&quot;)</code></pre>
<h2 id="performance">Performance</h2> <h2 id="performance">Performance</h2>
<p>Flags helpful for increasing performance.</p> <p>Flags helpful for increasing performance.</p>
<pre><code> --buffer-size SizeSuffix In memory buffer size when reading files for each --transfer (default 16Mi) <pre><code> --buffer-size SizeSuffix In memory buffer size when reading files for each --transfer (default 16Mi)
@ -33155,6 +33155,63 @@ decentralized object storage FrostFS).</p>
<li>Type: string</li> <li>Type: string</li>
<li>Required: false</li> <li>Required: false</li>
</ul> </ul>
<h2 id="backend-commands-4">Backend commands</h2>
<p>Here are the commands specific to the frostfs backend.</p>
<p>Run them with</p>
<pre><code>rclone backend COMMAND remote:</code></pre>
<p>The help below will explain what arguments each command takes.</p>
<p>See the <a
href="https://rclone.org/commands/rclone_backend/">backend</a> command
for more info on how to pass options and arguments.</p>
<p>These can be run on a running backend using the rc command <a
href="https://rclone.org/rc/#backend-command">backend/command</a>.</p>
<h3 id="info">info</h3>
<p>Show information about the FrostFS objects and containers</p>
<pre><code>rclone backend info remote: [options] [&lt;arguments&gt;+]</code></pre>
<p>This command can be used to get information about the FrostFS objects
and containers.</p>
<p>Usage Examples:</p>
<pre><code>rclone backend info frostfs:container/path/to/dir
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt -o &quot;format={cid}:{oid}&quot;</code></pre>
<p>The optional "format" flag overrides the information output. In this
example, if an object is stored in a container with the identifier
"9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1" and its own identifier is
"4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP", the output of this
command will be
"9mvN7hsucoGoHjxPqrWmDipnMaemGVDqrxxPyynn1:4VpcNFsZqsQt1Gnfw2utBnzn5Blgc7i4kvtuXyKyJp".</p>
<p>The default output format is the same as that of the frostfs-cli
utility, with the "container get" and "object head" options. Here is an
example of output:</p>
<pre><code> --- Container info ---
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner ID: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
Created: 2025-02-17 15:07:51 +0300 MSK
Attributes:
Timestamp=1739794071
Name=test
__SYSTEM__NAME=test
__SYSTEM__ZONE=container
__SYSTEM__DISABLE_HOMOMORPHIC_HASHING=true
Placement policy:
REP 3
--- Object info ---
ID: 4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
CreatedAt: 559
Size: 402905
HomoHash: &lt;empty&gt;
Checksum: 2a068fe24c53bc8bf7d6bbb997414f7938b080305dc45f9fd3ff684bc11fbb7b
Type: REGULAR
Attributes:
FileName=cat.png
FilePath=/dir1/dir2/dir3/cat.png
Timestamp=1733410524 (2024-12-05 17:55:24 +0300 MSK)
ID signature:
public key: 026b7c7a7a16225eb13a5a733495a1bcdd1f016dfa9193498821379b0de2ba6870
signature: 049f6712c8378d323269b605a282bcacd7565ce2eefe1f10a9739c48945f739d95102c478b9cb1d429cd3330b4b5262e725392e322de3bbfa4ce18a9c842289219</code></pre>
<h1 id="ftp">FTP</h1> <h1 id="ftp">FTP</h1>
<p>FTP is the File Transfer Protocol. Rclone FTP support is provided <p>FTP is the File Transfer Protocol. Rclone FTP support is provided
using the <a using the <a
@ -36222,7 +36279,7 @@ drives.</td>
</table> </table>
<p>See the <a href="https://rclone.org/docs/#metadata">metadata</a> docs <p>See the <a href="https://rclone.org/docs/#metadata">metadata</a> docs
for more info.</p> for more info.</p>
<h2 id="backend-commands-4">Backend commands</h2> <h2 id="backend-commands-5">Backend commands</h2>
<p>Here are the commands specific to the drive backend.</p> <p>Here are the commands specific to the drive backend.</p>
<p>Run them with</p> <p>Run them with</p>
<pre><code>rclone backend COMMAND remote:</code></pre> <pre><code>rclone backend COMMAND remote:</code></pre>
@ -37209,7 +37266,7 @@ default).</p>
written.</p> written.</p>
<p>See the <a href="https://rclone.org/docs/#metadata">metadata</a> docs <p>See the <a href="https://rclone.org/docs/#metadata">metadata</a> docs
for more info.</p> for more info.</p>
<h2 id="backend-commands-5">Backend commands</h2> <h2 id="backend-commands-6">Backend commands</h2>
<p>Here are the commands specific to the hasher backend.</p> <p>Here are the commands specific to the hasher backend.</p>
<p>Run them with</p> <p>Run them with</p>
<pre><code>rclone backend COMMAND remote:</code></pre> <pre><code>rclone backend COMMAND remote:</code></pre>
@ -38111,7 +38168,7 @@ may be in the listing.</p>
<li>Type: string</li> <li>Type: string</li>
<li>Required: false</li> <li>Required: false</li>
</ul> </ul>
<h2 id="backend-commands-6">Backend commands</h2> <h2 id="backend-commands-7">Backend commands</h2>
<p>Here are the commands specific to the http backend.</p> <p>Here are the commands specific to the http backend.</p>
<p>Run them with</p> <p>Run them with</p>
<pre><code>rclone backend COMMAND remote:</code></pre> <pre><code>rclone backend COMMAND remote:</code></pre>
@ -40745,7 +40802,7 @@ provided primarily for debugging purposes.</p>
<li>Type: string</li> <li>Type: string</li>
<li>Required: false</li> <li>Required: false</li>
</ul> </ul>
<h2 id="backend-commands-7">Backend commands</h2> <h2 id="backend-commands-8">Backend commands</h2>
<p>Here are the commands specific to the netstorage backend.</p> <p>Here are the commands specific to the netstorage backend.</p>
<p>Run them with</p> <p>Run them with</p>
<pre><code>rclone backend COMMAND remote:</code></pre> <pre><code>rclone backend COMMAND remote:</code></pre>
@ -43092,69 +43149,69 @@ href="https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/pe
API</a>, which differs slightly between OneDrive Personal and API</a>, which differs slightly between OneDrive Personal and
Business.</p> Business.</p>
<p>Example for OneDrive Personal:</p> <p>Example for OneDrive Personal:</p>
<div class="sourceCode" id="cb1264"><pre <div class="sourceCode" id="cb1268"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb1264-1"><a href="#cb1264-1" aria-hidden="true" tabindex="-1"></a><span class="ot">[</span></span> class="sourceCode json"><code class="sourceCode json"><span id="cb1268-1"><a href="#cb1268-1" aria-hidden="true" tabindex="-1"></a><span class="ot">[</span></span>
<span id="cb1264-2"><a href="#cb1264-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span></span> <span id="cb1268-2"><a href="#cb1268-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span></span>
<span id="cb1264-3"><a href="#cb1264-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;1234567890ABC!123&quot;</span><span class="fu">,</span></span> <span id="cb1268-3"><a href="#cb1268-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;1234567890ABC!123&quot;</span><span class="fu">,</span></span>
<span id="cb1264-4"><a href="#cb1264-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;grantedTo&quot;</span><span class="fu">:</span> <span class="fu">{</span></span> <span id="cb1268-4"><a href="#cb1268-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;grantedTo&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb1264-5"><a href="#cb1264-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="fu">{</span></span> <span id="cb1268-5"><a href="#cb1268-5" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb1264-6"><a href="#cb1264-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;ryan@contoso.com&quot;</span></span> <span id="cb1268-6"><a href="#cb1268-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;ryan@contoso.com&quot;</span></span>
<span id="cb1264-7"><a href="#cb1264-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> <span id="cb1268-7"><a href="#cb1268-7" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span>
<span id="cb1264-8"><a href="#cb1264-8" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;application&quot;</span><span class="fu">:</span> <span class="fu">{},</span></span> <span id="cb1268-8"><a href="#cb1268-8" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;application&quot;</span><span class="fu">:</span> <span class="fu">{},</span></span>
<span id="cb1264-9"><a href="#cb1264-9" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;device&quot;</span><span class="fu">:</span> <span class="fu">{}</span></span> <span id="cb1268-9"><a href="#cb1268-9" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;device&quot;</span><span class="fu">:</span> <span class="fu">{}</span></span>
<span id="cb1264-10"><a href="#cb1264-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> <span id="cb1268-10"><a href="#cb1268-10" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span>
<span id="cb1264-11"><a href="#cb1264-11" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;invitation&quot;</span><span class="fu">:</span> <span class="fu">{</span></span> <span id="cb1268-11"><a href="#cb1268-11" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;invitation&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb1264-12"><a href="#cb1264-12" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;email&quot;</span><span class="fu">:</span> <span class="st">&quot;ryan@contoso.com&quot;</span></span> <span id="cb1268-12"><a href="#cb1268-12" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;email&quot;</span><span class="fu">:</span> <span class="st">&quot;ryan@contoso.com&quot;</span></span>
<span id="cb1264-13"><a href="#cb1264-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> <span id="cb1268-13"><a href="#cb1268-13" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span>
<span id="cb1264-14"><a href="#cb1264-14" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;link&quot;</span><span class="fu">:</span> <span class="fu">{</span></span> <span id="cb1268-14"><a href="#cb1268-14" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;link&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb1264-15"><a href="#cb1264-15" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;webUrl&quot;</span><span class="fu">:</span> <span class="st">&quot;https://1drv.ms/t/s!1234567890ABC&quot;</span></span> <span id="cb1268-15"><a href="#cb1268-15" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;webUrl&quot;</span><span class="fu">:</span> <span class="st">&quot;https://1drv.ms/t/s!1234567890ABC&quot;</span></span>
<span id="cb1264-16"><a href="#cb1264-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> <span id="cb1268-16"><a href="#cb1268-16" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span>
<span id="cb1264-17"><a href="#cb1264-17" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;roles&quot;</span><span class="fu">:</span> <span class="ot">[</span></span> <span id="cb1268-17"><a href="#cb1268-17" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;roles&quot;</span><span class="fu">:</span> <span class="ot">[</span></span>
<span id="cb1264-18"><a href="#cb1264-18" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;read&quot;</span></span> <span id="cb1268-18"><a href="#cb1268-18" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;read&quot;</span></span>
<span id="cb1264-19"><a href="#cb1264-19" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span> <span id="cb1268-19"><a href="#cb1268-19" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span>
<span id="cb1264-20"><a href="#cb1264-20" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;shareId&quot;</span><span class="fu">:</span> <span class="st">&quot;s!1234567890ABC&quot;</span></span> <span id="cb1268-20"><a href="#cb1268-20" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;shareId&quot;</span><span class="fu">:</span> <span class="st">&quot;s!1234567890ABC&quot;</span></span>
<span id="cb1264-21"><a href="#cb1264-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> <span id="cb1268-21"><a href="#cb1268-21" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span>
<span id="cb1264-22"><a href="#cb1264-22" aria-hidden="true" tabindex="-1"></a><span class="ot">]</span></span></code></pre></div> <span id="cb1268-22"><a href="#cb1268-22" aria-hidden="true" tabindex="-1"></a><span class="ot">]</span></span></code></pre></div>
<p>Example for OneDrive Business:</p> <p>Example for OneDrive Business:</p>
<div class="sourceCode" id="cb1265"><pre <div class="sourceCode" id="cb1269"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb1265-1"><a href="#cb1265-1" aria-hidden="true" tabindex="-1"></a><span class="ot">[</span></span> class="sourceCode json"><code class="sourceCode json"><span id="cb1269-1"><a href="#cb1269-1" aria-hidden="true" tabindex="-1"></a><span class="ot">[</span></span>
<span id="cb1265-2"><a href="#cb1265-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span></span> <span id="cb1269-2"><a href="#cb1269-2" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span></span>
<span id="cb1265-3"><a href="#cb1265-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;48d31887-5fad-4d73-a9f5-3c356e68a038&quot;</span><span class="fu">,</span></span> <span id="cb1269-3"><a href="#cb1269-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;48d31887-5fad-4d73-a9f5-3c356e68a038&quot;</span><span class="fu">,</span></span>
<span id="cb1265-4"><a href="#cb1265-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;grantedToIdentities&quot;</span><span class="fu">:</span> <span class="ot">[</span></span> <span id="cb1269-4"><a href="#cb1269-4" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;grantedToIdentities&quot;</span><span class="fu">:</span> <span class="ot">[</span></span>
<span id="cb1265-5"><a href="#cb1265-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span></span> <span id="cb1269-5"><a href="#cb1269-5" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span></span>
<span id="cb1265-6"><a href="#cb1265-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="fu">{</span></span> <span id="cb1269-6"><a href="#cb1269-6" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb1265-7"><a href="#cb1265-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;displayName&quot;</span><span class="fu">:</span> <span class="st">&quot;ryan@contoso.com&quot;</span></span> <span id="cb1269-7"><a href="#cb1269-7" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;displayName&quot;</span><span class="fu">:</span> <span class="st">&quot;ryan@contoso.com&quot;</span></span>
<span id="cb1265-8"><a href="#cb1265-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> <span id="cb1269-8"><a href="#cb1269-8" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span>
<span id="cb1265-9"><a href="#cb1265-9" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;application&quot;</span><span class="fu">:</span> <span class="fu">{},</span></span> <span id="cb1269-9"><a href="#cb1269-9" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;application&quot;</span><span class="fu">:</span> <span class="fu">{},</span></span>
<span id="cb1265-10"><a href="#cb1265-10" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;device&quot;</span><span class="fu">:</span> <span class="fu">{}</span></span> <span id="cb1269-10"><a href="#cb1269-10" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;device&quot;</span><span class="fu">:</span> <span class="fu">{}</span></span>
<span id="cb1265-11"><a href="#cb1265-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> <span id="cb1269-11"><a href="#cb1269-11" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span>
<span id="cb1265-12"><a href="#cb1265-12" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span> <span id="cb1269-12"><a href="#cb1269-12" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span>
<span id="cb1265-13"><a href="#cb1265-13" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;link&quot;</span><span class="fu">:</span> <span class="fu">{</span></span> <span id="cb1269-13"><a href="#cb1269-13" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;link&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb1265-14"><a href="#cb1265-14" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;type&quot;</span><span class="fu">:</span> <span class="st">&quot;view&quot;</span><span class="fu">,</span></span> <span id="cb1269-14"><a href="#cb1269-14" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;type&quot;</span><span class="fu">:</span> <span class="st">&quot;view&quot;</span><span class="fu">,</span></span>
<span id="cb1265-15"><a href="#cb1265-15" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;scope&quot;</span><span class="fu">:</span> <span class="st">&quot;users&quot;</span><span class="fu">,</span></span> <span id="cb1269-15"><a href="#cb1269-15" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;scope&quot;</span><span class="fu">:</span> <span class="st">&quot;users&quot;</span><span class="fu">,</span></span>
<span id="cb1265-16"><a href="#cb1265-16" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;webUrl&quot;</span><span class="fu">:</span> <span class="st">&quot;https://contoso.sharepoint.com/:w:/t/design/a577ghg9hgh737613bmbjf839026561fmzhsr85ng9f3hjck2t5s&quot;</span></span> <span id="cb1269-16"><a href="#cb1269-16" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;webUrl&quot;</span><span class="fu">:</span> <span class="st">&quot;https://contoso.sharepoint.com/:w:/t/design/a577ghg9hgh737613bmbjf839026561fmzhsr85ng9f3hjck2t5s&quot;</span></span>
<span id="cb1265-17"><a href="#cb1265-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> <span id="cb1269-17"><a href="#cb1269-17" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span>
<span id="cb1265-18"><a href="#cb1265-18" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;roles&quot;</span><span class="fu">:</span> <span class="ot">[</span></span> <span id="cb1269-18"><a href="#cb1269-18" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;roles&quot;</span><span class="fu">:</span> <span class="ot">[</span></span>
<span id="cb1265-19"><a href="#cb1265-19" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;read&quot;</span></span> <span id="cb1269-19"><a href="#cb1269-19" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;read&quot;</span></span>
<span id="cb1265-20"><a href="#cb1265-20" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span> <span id="cb1269-20"><a href="#cb1269-20" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span>
<span id="cb1265-21"><a href="#cb1265-21" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;shareId&quot;</span><span class="fu">:</span> <span class="st">&quot;u!LKj1lkdlals90j1nlkascl&quot;</span></span> <span id="cb1269-21"><a href="#cb1269-21" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;shareId&quot;</span><span class="fu">:</span> <span class="st">&quot;u!LKj1lkdlals90j1nlkascl&quot;</span></span>
<span id="cb1265-22"><a href="#cb1265-22" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span><span class="ot">,</span></span> <span id="cb1269-22"><a href="#cb1269-22" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span><span class="ot">,</span></span>
<span id="cb1265-23"><a href="#cb1265-23" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span></span> <span id="cb1269-23"><a href="#cb1269-23" aria-hidden="true" tabindex="-1"></a> <span class="fu">{</span></span>
<span id="cb1265-24"><a href="#cb1265-24" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;5D33DD65C6932946&quot;</span><span class="fu">,</span></span> <span id="cb1269-24"><a href="#cb1269-24" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;5D33DD65C6932946&quot;</span><span class="fu">,</span></span>
<span id="cb1265-25"><a href="#cb1265-25" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;grantedTo&quot;</span><span class="fu">:</span> <span class="fu">{</span></span> <span id="cb1269-25"><a href="#cb1269-25" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;grantedTo&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb1265-26"><a href="#cb1265-26" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="fu">{</span></span> <span id="cb1269-26"><a href="#cb1269-26" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;user&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb1265-27"><a href="#cb1265-27" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;displayName&quot;</span><span class="fu">:</span> <span class="st">&quot;John Doe&quot;</span><span class="fu">,</span></span> <span id="cb1269-27"><a href="#cb1269-27" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;displayName&quot;</span><span class="fu">:</span> <span class="st">&quot;John Doe&quot;</span><span class="fu">,</span></span>
<span id="cb1265-28"><a href="#cb1265-28" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;efee1b77-fb3b-4f65-99d6-274c11914d12&quot;</span></span> <span id="cb1269-28"><a href="#cb1269-28" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;id&quot;</span><span class="fu">:</span> <span class="st">&quot;efee1b77-fb3b-4f65-99d6-274c11914d12&quot;</span></span>
<span id="cb1265-29"><a href="#cb1265-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> <span id="cb1269-29"><a href="#cb1269-29" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span>
<span id="cb1265-30"><a href="#cb1265-30" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;application&quot;</span><span class="fu">:</span> <span class="fu">{},</span></span> <span id="cb1269-30"><a href="#cb1269-30" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;application&quot;</span><span class="fu">:</span> <span class="fu">{},</span></span>
<span id="cb1265-31"><a href="#cb1265-31" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;device&quot;</span><span class="fu">:</span> <span class="fu">{}</span></span> <span id="cb1269-31"><a href="#cb1269-31" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;device&quot;</span><span class="fu">:</span> <span class="fu">{}</span></span>
<span id="cb1265-32"><a href="#cb1265-32" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span> <span id="cb1269-32"><a href="#cb1269-32" aria-hidden="true" tabindex="-1"></a> <span class="fu">},</span></span>
<span id="cb1265-33"><a href="#cb1265-33" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;roles&quot;</span><span class="fu">:</span> <span class="ot">[</span></span> <span id="cb1269-33"><a href="#cb1269-33" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;roles&quot;</span><span class="fu">:</span> <span class="ot">[</span></span>
<span id="cb1265-34"><a href="#cb1265-34" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;owner&quot;</span></span> <span id="cb1269-34"><a href="#cb1269-34" aria-hidden="true" tabindex="-1"></a> <span class="st">&quot;owner&quot;</span></span>
<span id="cb1265-35"><a href="#cb1265-35" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span> <span id="cb1269-35"><a href="#cb1269-35" aria-hidden="true" tabindex="-1"></a> <span class="ot">]</span><span class="fu">,</span></span>
<span id="cb1265-36"><a href="#cb1265-36" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;shareId&quot;</span><span class="fu">:</span> <span class="st">&quot;FWxc1lasfdbEAGM5fI7B67aB5ZMPDMmQ11U&quot;</span></span> <span id="cb1269-36"><a href="#cb1269-36" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;shareId&quot;</span><span class="fu">:</span> <span class="st">&quot;FWxc1lasfdbEAGM5fI7B67aB5ZMPDMmQ11U&quot;</span></span>
<span id="cb1265-37"><a href="#cb1265-37" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> <span id="cb1269-37"><a href="#cb1269-37" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span>
<span id="cb1265-38"><a href="#cb1265-38" aria-hidden="true" tabindex="-1"></a><span class="ot">]</span></span></code></pre></div> <span id="cb1269-38"><a href="#cb1269-38" aria-hidden="true" tabindex="-1"></a><span class="ot">]</span></span></code></pre></div>
<p>To write permissions, pass in a "permissions" metadata key using this <p>To write permissions, pass in a "permissions" metadata key using this
same format. The <a same format. The <a
href="https://rclone.org/docs/#metadata-mapper"><code>--metadata-mapper</code></a> href="https://rclone.org/docs/#metadata-mapper"><code>--metadata-mapper</code></a>
@ -43168,12 +43225,12 @@ for a user. Creating a Public Link is also supported, if
<code>Link.Scope</code> is set to <code>"anonymous"</code>.</p> <code>Link.Scope</code> is set to <code>"anonymous"</code>.</p>
<p>Example request to add a "read" permission with <p>Example request to add a "read" permission with
<code>--metadata-mapper</code>:</p> <code>--metadata-mapper</code>:</p>
<div class="sourceCode" id="cb1266"><pre <div class="sourceCode" id="cb1270"><pre
class="sourceCode json"><code class="sourceCode json"><span id="cb1266-1"><a href="#cb1266-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span> class="sourceCode json"><code class="sourceCode json"><span id="cb1270-1"><a href="#cb1270-1" aria-hidden="true" tabindex="-1"></a><span class="fu">{</span></span>
<span id="cb1266-2"><a href="#cb1266-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;Metadata&quot;</span><span class="fu">:</span> <span class="fu">{</span></span> <span id="cb1270-2"><a href="#cb1270-2" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;Metadata&quot;</span><span class="fu">:</span> <span class="fu">{</span></span>
<span id="cb1266-3"><a href="#cb1266-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;permissions&quot;</span><span class="fu">:</span> <span class="st">&quot;[{</span><span class="ch">\&quot;</span><span class="st">grantedToIdentities</span><span class="ch">\&quot;</span><span class="st">:[{</span><span class="ch">\&quot;</span><span class="st">user</span><span class="ch">\&quot;</span><span class="st">:{</span><span class="ch">\&quot;</span><span class="st">id</span><span class="ch">\&quot;</span><span class="st">:</span><span class="ch">\&quot;</span><span class="st">ryan@contoso.com</span><span class="ch">\&quot;</span><span class="st">}}],</span><span class="ch">\&quot;</span><span class="st">roles</span><span class="ch">\&quot;</span><span class="st">:[</span><span class="ch">\&quot;</span><span class="st">read</span><span class="ch">\&quot;</span><span class="st">]}]&quot;</span></span> <span id="cb1270-3"><a href="#cb1270-3" aria-hidden="true" tabindex="-1"></a> <span class="dt">&quot;permissions&quot;</span><span class="fu">:</span> <span class="st">&quot;[{</span><span class="ch">\&quot;</span><span class="st">grantedToIdentities</span><span class="ch">\&quot;</span><span class="st">:[{</span><span class="ch">\&quot;</span><span class="st">user</span><span class="ch">\&quot;</span><span class="st">:{</span><span class="ch">\&quot;</span><span class="st">id</span><span class="ch">\&quot;</span><span class="st">:</span><span class="ch">\&quot;</span><span class="st">ryan@contoso.com</span><span class="ch">\&quot;</span><span class="st">}}],</span><span class="ch">\&quot;</span><span class="st">roles</span><span class="ch">\&quot;</span><span class="st">:[</span><span class="ch">\&quot;</span><span class="st">read</span><span class="ch">\&quot;</span><span class="st">]}]&quot;</span></span>
<span id="cb1266-4"><a href="#cb1266-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span> <span id="cb1270-4"><a href="#cb1270-4" aria-hidden="true" tabindex="-1"></a> <span class="fu">}</span></span>
<span id="cb1266-5"><a href="#cb1266-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div> <span id="cb1270-5"><a href="#cb1270-5" aria-hidden="true" tabindex="-1"></a><span class="fu">}</span></span></code></pre></div>
<p>Note that adding a permission can fail if a conflicting permission <p>Note that adding a permission can fail if a conflicting permission
already exists for the file/folder.</p> already exists for the file/folder.</p>
<p>To update an existing permission, include both the Permission ID and <p>To update an existing permission, include both the Permission ID and
@ -44502,7 +44559,7 @@ Encryption
<li>Type: string</li> <li>Type: string</li>
<li>Required: false</li> <li>Required: false</li>
</ul> </ul>
<h2 id="backend-commands-8">Backend commands</h2> <h2 id="backend-commands-9">Backend commands</h2>
<p>Here are the commands specific to the oracleobjectstorage <p>Here are the commands specific to the oracleobjectstorage
backend.</p> backend.</p>
<p>Run them with</p> <p>Run them with</p>
@ -46470,7 +46527,7 @@ Slash,LtGt,DoubleQuote,Colon,Question,Asterisk,Pipe,BackSlash,Ctl,LeftSpace,Righ
<li>Type: string</li> <li>Type: string</li>
<li>Required: false</li> <li>Required: false</li>
</ul> </ul>
<h2 id="backend-commands-9">Backend commands</h2> <h2 id="backend-commands-10">Backend commands</h2>
<p>Here are the commands specific to the pikpak backend.</p> <p>Here are the commands specific to the pikpak backend.</p>
<p>Run them with</p> <p>Run them with</p>
<pre><code>rclone backend COMMAND remote:</code></pre> <pre><code>rclone backend COMMAND remote:</code></pre>
@ -52315,7 +52372,7 @@ backend.</p>
</table> </table>
<p>See the <a href="https://rclone.org/docs/#metadata">metadata</a> docs <p>See the <a href="https://rclone.org/docs/#metadata">metadata</a> docs
for more info.</p> for more info.</p>
<h2 id="backend-commands-10">Backend commands</h2> <h2 id="backend-commands-11">Backend commands</h2>
<p>Here are the commands specific to the local backend.</p> <p>Here are the commands specific to the local backend.</p>
<p>Run them with</p> <p>Run them with</p>
<pre><code>rclone backend COMMAND remote:</code></pre> <pre><code>rclone backend COMMAND remote:</code></pre>

73
MANUAL.md generated
View file

@ -1,6 +1,6 @@
% rclone(1) User Manual % rclone(1) User Manual
% Nick Craig-Wood % Nick Craig-Wood
% Jan 23, 2025 % Feb 22, 2025
# Rclone syncs your files to cloud storage # Rclone syncs your files to cloud storage
@ -20498,7 +20498,7 @@ Flags for general networking and HTTP stuff.
--tpslimit float Limit HTTP transactions per second to this --tpslimit float Limit HTTP transactions per second to this
--tpslimit-burst int Max burst of transactions for --tpslimit (default 1) --tpslimit-burst int Max burst of transactions for --tpslimit (default 1)
--use-cookies Enable session cookiejar --use-cookies Enable session cookiejar
--user-agent string Set the user-agent to a specified string (default "rclone/v1.68.2-beta.8335.a85292ca0.feature/add-container-zones-support") --user-agent string Set the user-agent to a specified string (default "rclone/v1.68.2-beta.8339.71f0cdbd4.feat/frostfs_info_cmd")
``` ```
@ -35104,6 +35104,75 @@ Properties:
- Type: string - Type: string
- Required: false - Required: false
## Backend commands
Here are the commands specific to the frostfs backend.
Run them with
rclone backend COMMAND remote:
The help below will explain what arguments each command takes.
See the [backend](https://rclone.org/commands/rclone_backend/) command for more
info on how to pass options and arguments.
These can be run on a running backend using the rc command
[backend/command](https://rclone.org/rc/#backend-command).
### info
Show information about the FrostFS objects and containers
rclone backend info remote: [options] [<arguments>+]
This command can be used to get information about the FrostFS objects and containers.
Usage Examples:
rclone backend info frostfs:container/path/to/dir
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt -o "format={cid}:{oid}"
The optional "format" flag overrides the information output. In this example, if an object is stored in
a container with the identifier "9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1" and
its own identifier is "4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP", the output of this command will be
"9mvN7hsucoGoHjxPqrWmDipnMaemGVDqrxxPyynn1:4VpcNFsZqsQt1Gnfw2utBnzn5Blgc7i4kvtuXyKyJp".
The default output format is the same as that of the frostfs-cli utility,
with the "container get" and "object head" options. Here is an example of output:
--- Container info ---
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner ID: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
Created: 2025-02-17 15:07:51 +0300 MSK
Attributes:
Timestamp=1739794071
Name=test
__SYSTEM__NAME=test
__SYSTEM__ZONE=container
__SYSTEM__DISABLE_HOMOMORPHIC_HASHING=true
Placement policy:
REP 3
--- Object info ---
ID: 4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
CreatedAt: 559
Size: 402905
HomoHash: <empty>
Checksum: 2a068fe24c53bc8bf7d6bbb997414f7938b080305dc45f9fd3ff684bc11fbb7b
Type: REGULAR
Attributes:
FileName=cat.png
FilePath=/dir1/dir2/dir3/cat.png
Timestamp=1733410524 (2024-12-05 17:55:24 +0300 MSK)
ID signature:
public key: 026b7c7a7a16225eb13a5a733495a1bcdd1f016dfa9193498821379b0de2ba6870
signature: 049f6712c8378d323269b605a282bcacd7565ce2eefe1f10a9739c48945f739d95102c478b9cb1d429cd3330b4b5262e725392e322de3bbfa4ce18a9c842289219
# FTP # FTP

76
MANUAL.txt generated
View file

@ -1,6 +1,6 @@
rclone(1) User Manual rclone(1) User Manual
Nick Craig-Wood Nick Craig-Wood
Jan 23, 2025 Feb 22, 2025
Rclone syncs your files to cloud storage Rclone syncs your files to cloud storage
@ -20166,7 +20166,7 @@ Flags for general networking and HTTP stuff.
--tpslimit float Limit HTTP transactions per second to this --tpslimit float Limit HTTP transactions per second to this
--tpslimit-burst int Max burst of transactions for --tpslimit (default 1) --tpslimit-burst int Max burst of transactions for --tpslimit (default 1)
--use-cookies Enable session cookiejar --use-cookies Enable session cookiejar
--user-agent string Set the user-agent to a specified string (default "rclone/v1.68.2-beta.8335.a85292ca0.feature/add-container-zones-support") --user-agent string Set the user-agent to a specified string (default "rclone/v1.68.2-beta.8339.71f0cdbd4.feat/frostfs_info_cmd")
Performance Performance
@ -34575,6 +34575,78 @@ Properties:
- Type: string - Type: string
- Required: false - Required: false
Backend commands
Here are the commands specific to the frostfs backend.
Run them with
rclone backend COMMAND remote:
The help below will explain what arguments each command takes.
See the backend command for more info on how to pass options and
arguments.
These can be run on a running backend using the rc command
backend/command.
info
Show information about the FrostFS objects and containers
rclone backend info remote: [options] [<arguments>+]
This command can be used to get information about the FrostFS objects
and containers.
Usage Examples:
rclone backend info frostfs:container/path/to/dir
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt -o "format={cid}:{oid}"
The optional "format" flag overrides the information output. In this
example, if an object is stored in a container with the identifier
"9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1" and its own identifier is
"4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP", the output of this
command will be
"9mvN7hsucoGoHjxPqrWmDipnMaemGVDqrxxPyynn1:4VpcNFsZqsQt1Gnfw2utBnzn5Blgc7i4kvtuXyKyJp".
The default output format is the same as that of the frostfs-cli
utility, with the "container get" and "object head" options. Here is an
example of output:
--- Container info ---
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner ID: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
Created: 2025-02-17 15:07:51 +0300 MSK
Attributes:
Timestamp=1739794071
Name=test
__SYSTEM__NAME=test
__SYSTEM__ZONE=container
__SYSTEM__DISABLE_HOMOMORPHIC_HASHING=true
Placement policy:
REP 3
--- Object info ---
ID: 4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
CreatedAt: 559
Size: 402905
HomoHash: <empty>
Checksum: 2a068fe24c53bc8bf7d6bbb997414f7938b080305dc45f9fd3ff684bc11fbb7b
Type: REGULAR
Attributes:
FileName=cat.png
FilePath=/dir1/dir2/dir3/cat.png
Timestamp=1733410524 (2024-12-05 17:55:24 +0300 MSK)
ID signature:
public key: 026b7c7a7a16225eb13a5a733495a1bcdd1f016dfa9193498821379b0de2ba6870
signature: 049f6712c8378d323269b605a282bcacd7565ce2eefe1f10a9739c48945f739d95102c478b9cb1d429cd3330b4b5262e725392e322de3bbfa4ce18a9c842289219
FTP FTP
FTP is the File Transfer Protocol. Rclone FTP support is provided using FTP is the File Transfer Protocol. Rclone FTP support is provided using

View file

@ -17,6 +17,8 @@ import (
"time" "time"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/ape" "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/ape"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/refs"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/checksum"
sdkClient "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client" sdkClient "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client"
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container" "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container"
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id" cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
@ -41,6 +43,7 @@ func init() {
Name: "frostfs", Name: "frostfs",
Description: "Distributed, decentralized object storage FrostFS", Description: "Distributed, decentralized object storage FrostFS",
NewFs: NewFs, NewFs: NewFs,
CommandHelp: commandHelp,
Options: []fs.Option{ Options: []fs.Option{
{ {
Name: "endpoint", Name: "endpoint",
@ -156,6 +159,59 @@ func init() {
}) })
} }
var commandHelp = []fs.CommandHelp{
{
Name: "info",
Short: "Show information about the FrostFS objects and containers",
Long: `This command can be used to get information about the FrostFS objects and containers.
Usage Examples:
rclone backend info frostfs:container/path/to/dir
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt -o "format={cid}:{oid}"
The optional "format" flag overrides the information output. In this example, if an object is stored in
a container with the identifier "9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1" and
its own identifier is "4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP", the output of this command will be
"9mvN7hsucoGoHjxPqrWmDipnMaemGVDqrxxPyynn1:4VpcNFsZqsQt1Gnfw2utBnzn5Blgc7i4kvtuXyKyJp".
The default output format is the same as that of the frostfs-cli utility,
with the "container get" and "object head" options. Here is an example of output:
--- Container info ---
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner ID: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
Created: 2025-02-17 15:07:51 +0300 MSK
Attributes:
Timestamp=1739794071
Name=test
__SYSTEM__NAME=test
__SYSTEM__ZONE=container
__SYSTEM__DISABLE_HOMOMORPHIC_HASHING=true
Placement policy:
REP 3
--- Object info ---
ID: 4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
CreatedAt: 559
Size: 402905
HomoHash: <empty>
Checksum: 2a068fe24c53bc8bf7d6bbb997414f7938b080305dc45f9fd3ff684bc11fbb7b
Type: REGULAR
Attributes:
FileName=cat.png
FilePath=/dir1/dir2/dir3/cat.png
Timestamp=1733410524 (2024-12-05 17:55:24 +0300 MSK)
ID signature:
public key: 026b7c7a7a16225eb13a5a733495a1bcdd1f016dfa9193498821379b0de2ba6870
signature: 049f6712c8378d323269b605a282bcacd7565ce2eefe1f10a9739c48945f739d95102c478b9cb1d429cd3330b4b5262e725392e322de3bbfa4ce18a9c842289219
`,
},
}
var errMalformedObject = errors.New("malformed object") var errMalformedObject = errors.New("malformed object")
// Options defines the configuration for this backend // Options defines the configuration for this backend
@ -213,6 +269,272 @@ type Object struct {
timestamp time.Time timestamp time.Time
} }
// Command the backend to run a named command
//
// The command run is name
// args may be used to read arguments from
// opts may be used to read optional arguments from
func (f *Fs) Command(ctx context.Context, name string, arg []string, opt map[string]string) (out interface{}, err error) {
switch name {
case "info":
return f.infoCmd(ctx, arg, opt)
default:
return nil, fs.ErrorCommandNotFound
}
}
func (f *Fs) containerInfo(ctx context.Context, cnrID cid.ID) (container.Container, error) {
prm := pool.PrmContainerGet{
ContainerID: cnrID,
}
var cnr container.Container
cnr, err := f.pool.GetContainer(ctx, prm)
if err != nil {
return container.Container{}, fmt.Errorf("couldn't get container '%s': %w", cnrID, err)
}
return cnr, err
}
func (f *Fs) getObjectsHead(ctx context.Context, cnrID cid.ID, objIDs []oid.ID) ([]object.Object, error) {
var res []object.Object
for _, objID := range objIDs {
var prmHead pool.PrmObjectHead
prmHead.SetAddress(newAddress(cnrID, objID))
obj, err := f.pool.HeadObject(ctx, prmHead)
if err != nil {
return nil, err
}
res = append(res, obj)
}
return res, nil
}
type printer struct {
w io.Writer
err error
}
func newPrinter(w io.Writer) *printer {
return &printer{w: w}
}
func (p *printer) printf(format string, a ...interface{}) {
if p.err != nil {
return
}
if _, err := fmt.Fprintf(p.w, format, a...); err != nil {
p.err = err
}
}
func (p *printer) lastError() error {
return p.err
}
func (p *printer) printContainerInfo(cnrID cid.ID, cnr container.Container) {
p.printf("CID: %v\nOwner ID: %v", cnrID, cnr.Owner())
var timestamp time.Time
var attrs []string
cnr.IterateAttributes(func(key string, value string) {
attrs = append(attrs, fmt.Sprintf(" %v=%v", key, value))
if key == object.AttributeTimestamp {
val, err := strconv.ParseInt(value, 10, 64)
if err == nil {
timestamp = time.Unix(val, 0)
}
}
})
if !timestamp.IsZero() {
p.printf("\nCreated: %v", timestamp)
}
if len(attrs) > 0 {
p.printf("\nAttributes:\n%s", strings.Join(attrs, "\n"))
}
s := bytes.NewBufferString("")
if err := cnr.PlacementPolicy().WriteStringTo(s); err != nil {
return
}
p.printf("\nPlacement policy:\n%s", s.String())
}
func (p *printer) printChecksum(name string, recv func() (checksum.Checksum, bool)) {
var strVal string
cs, csSet := recv()
if csSet {
strVal = hex.EncodeToString(cs.Value())
} else {
strVal = "<empty>"
}
p.printf("\n%s: %s", name, strVal)
}
func (p *printer) printObject(obj *object.Object) {
objIDStr := "<empty>"
cnrIDStr := objIDStr
if objID, ok := obj.ID(); ok {
objIDStr = objID.String()
}
if cnrID, ok := obj.ContainerID(); ok {
cnrIDStr = cnrID.String()
}
p.printf("\nID: %v", objIDStr)
p.printf("\nCID: %v", cnrIDStr)
p.printf("\nOwner: %s", obj.OwnerID())
p.printf("\nCreatedAt: %d", obj.CreationEpoch())
p.printf("\nSize: %d", obj.PayloadSize())
p.printChecksum("HomoHash", obj.PayloadHomomorphicHash)
p.printChecksum("Checksum", obj.PayloadChecksum)
p.printf("\nType: %s", obj.Type())
p.printf("\nAttributes:")
for _, attr := range obj.Attributes() {
if attr.Key() == object.AttributeTimestamp {
var strVal string
val, err := strconv.ParseInt(attr.Value(), 10, 64)
if err == nil {
strVal = time.Unix(val, 0).String()
} else {
strVal = "malformed"
}
p.printf("\n %s=%s (%s)",
attr.Key(),
attr.Value(),
strVal)
continue
}
p.printf("\n %s=%s", attr.Key(), attr.Value())
}
if signature := obj.Signature(); signature != nil {
p.printf("\nID signature:")
var sigV2 refs.Signature
signature.WriteToV2(&sigV2)
p.printf("\n public key: %s", hex.EncodeToString(sigV2.GetKey()))
p.printf("\n signature: %s", hex.EncodeToString(sigV2.GetSign()))
}
if ecHeader := obj.ECHeader(); ecHeader != nil {
p.printf("\nEC header:")
p.printf("\n parent object ID: %s", ecHeader.Parent().EncodeToString())
p.printf("\n index: %d", ecHeader.Index())
p.printf("\n total: %d", ecHeader.Total())
p.printf("\n header length: %d", ecHeader.HeaderLength())
}
p.printSplitHeader(obj)
}
func (p *printer) printSplitHeader(obj *object.Object) {
if splitID := obj.SplitID(); splitID != nil {
p.printf("Split ID: %s\n", splitID)
}
if objID, ok := obj.ParentID(); ok {
p.printf("Split ParentID: %s\n", objID)
}
if prev, ok := obj.PreviousID(); ok {
p.printf("\nSplit PreviousID: %s", prev)
}
for _, child := range obj.Children() {
p.printf("\nSplit ChildID: %s", child.String())
}
parent := obj.Parent()
if parent != nil {
p.printf("\n\nSplit Parent Header:")
p.printObject(parent)
}
}
func formattedInfoOutput(format string, cnrID cid.ID, objHeads []object.Object) (string, error) {
format = strings.ReplaceAll(format, "{cid}", cnrID.String())
objIDStr := "<empty>"
if len(objHeads) > 0 {
objID, ok := objHeads[0].ID()
if ok {
objIDStr = objID.String()
}
}
return strings.ReplaceAll(format, "{oid}", objIDStr), nil
}
func (f *Fs) infoCmd(ctx context.Context, arg []string, opt map[string]string) (out interface{}, err error) {
var cnrID cid.ID
if cnrID, err = f.resolveContainerID(ctx, f.rootContainer); err != nil {
return nil, err
}
var format string
for k, v := range opt {
switch k {
case "format":
format = v
default:
return nil, fmt.Errorf("unknown option \"%s\"", k)
}
}
var objIDs []oid.ID
var filePath string
if len(arg) > 0 {
filePath = strings.TrimPrefix(arg[0], "/")
if f.rootDirectory != "" {
filePath = f.rootDirectory + "/" + filePath
}
if objIDs, err = f.findObjectsFilePath(ctx, cnrID, filePath); err != nil {
return
}
}
cnr, err := f.containerInfo(ctx, cnrID)
if err != nil {
return
}
var objHeads []object.Object
if objHeads, err = f.getObjectsHead(ctx, cnrID, objIDs); err != nil {
return
}
if format != "" {
return formattedInfoOutput(format, cnrID, objHeads)
}
w := bytes.NewBufferString("")
p := newPrinter(w)
p.printf(" --- Container info ---\n")
p.printContainerInfo(cnrID, cnr)
if len(arg) > 0 {
p.printf("\n\n --- Object info ---")
if len(objHeads) > 0 {
// Print info about the first object only
p.printObject(&objHeads[0])
} else {
p.printf("\nNo object with \"%s\" file path was found", filePath)
}
}
if err := p.lastError(); err != nil {
return nil, err
}
return w.String(), nil
}
// Shutdown the backend, closing any background tasks and any // Shutdown the backend, closing any background tasks and any
// cached connections. // cached connections.
func (f *Fs) Shutdown(_ context.Context) error { func (f *Fs) Shutdown(_ context.Context) error {

View file

@ -945,7 +945,7 @@ rclone [flags]
--use-json-log Use json log format --use-json-log Use json log format
--use-mmap Use mmap allocator (see docs) --use-mmap Use mmap allocator (see docs)
--use-server-modtime Use server modified time instead of object metadata --use-server-modtime Use server modified time instead of object metadata
--user-agent string Set the user-agent to a specified string (default "rclone/v1.68.2-beta.8335.a85292ca0.feature/add-container-zones-support") --user-agent string Set the user-agent to a specified string (default "rclone/v1.68.2-beta.8339.71f0cdbd4.feat/frostfs_info_cmd")
-v, --verbose count Print lots more stuff (repeat for more) -v, --verbose count Print lots more stuff (repeat for more)
-V, --version Print the version number -V, --version Print the version number
--webdav-bearer-token string Bearer token instead of user/pass (e.g. a Macaroon) --webdav-bearer-token string Bearer token instead of user/pass (e.g. a Macaroon)

View file

@ -115,7 +115,7 @@ Flags for general networking and HTTP stuff.
--tpslimit float Limit HTTP transactions per second to this --tpslimit float Limit HTTP transactions per second to this
--tpslimit-burst int Max burst of transactions for --tpslimit (default 1) --tpslimit-burst int Max burst of transactions for --tpslimit (default 1)
--use-cookies Enable session cookiejar --use-cookies Enable session cookiejar
--user-agent string Set the user-agent to a specified string (default "rclone/v1.68.2-beta.8335.a85292ca0.feature/add-container-zones-support") --user-agent string Set the user-agent to a specified string (default "rclone/v1.68.2-beta.8339.71f0cdbd4.feat/frostfs_info_cmd")
``` ```

View file

@ -487,4 +487,73 @@ Properties:
- Type: string - Type: string
- Required: false - Required: false
## Backend commands
Here are the commands specific to the frostfs backend.
Run them with
rclone backend COMMAND remote:
The help below will explain what arguments each command takes.
See the [backend](/commands/rclone_backend/) command for more
info on how to pass options and arguments.
These can be run on a running backend using the rc command
[backend/command](/rc/#backend-command).
### info
Show information about the FrostFS objects and containers
rclone backend info remote: [options] [<arguments>+]
This command can be used to get information about the FrostFS objects and containers.
Usage Examples:
rclone backend info frostfs:container/path/to/dir
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt -o "format={cid}:{oid}"
The optional "format" flag overrides the information output. In this example, if an object is stored in
a container with the identifier "9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1" and
its own identifier is "4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP", the output of this command will be
"9mvN7hsucoGoHjxPqrWmDipnMaemGVDqrxxPyynn1:4VpcNFsZqsQt1Gnfw2utBnzn5Blgc7i4kvtuXyKyJp".
The default output format is the same as that of the frostfs-cli utility,
with the "container get" and "object head" options. Here is an example of output:
--- Container info ---
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner ID: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
Created: 2025-02-17 15:07:51 +0300 MSK
Attributes:
Timestamp=1739794071
Name=test
__SYSTEM__NAME=test
__SYSTEM__ZONE=container
__SYSTEM__DISABLE_HOMOMORPHIC_HASHING=true
Placement policy:
REP 3
--- Object info ---
ID: 4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
CreatedAt: 559
Size: 402905
HomoHash: <empty>
Checksum: 2a068fe24c53bc8bf7d6bbb997414f7938b080305dc45f9fd3ff684bc11fbb7b
Type: REGULAR
Attributes:
FileName=cat.png
FilePath=/dir1/dir2/dir3/cat.png
Timestamp=1733410524 (2024-12-05 17:55:24 +0300 MSK)
ID signature:
public key: 026b7c7a7a16225eb13a5a733495a1bcdd1f016dfa9193498821379b0de2ba6870
signature: 049f6712c8378d323269b605a282bcacd7565ce2eefe1f10a9739c48945f739d95102c478b9cb1d429cd3330b4b5262e725392e322de3bbfa4ce18a9c842289219
{{< rem autogenerated options stop >}} {{< rem autogenerated options stop >}}

92
rclone.1 generated
View file

@ -15,7 +15,7 @@
. ftr VB CB . ftr VB CB
. ftr VBI CBI . ftr VBI CBI
.\} .\}
.TH "rclone" "1" "Jan 23, 2025" "User Manual" "" .TH "rclone" "1" "Feb 22, 2025" "User Manual" ""
.hy .hy
.SH Rclone syncs your files to cloud storage .SH Rclone syncs your files to cloud storage
.PP .PP
@ -27735,7 +27735,7 @@ Flags for general networking and HTTP stuff.
--tpslimit float Limit HTTP transactions per second to this --tpslimit float Limit HTTP transactions per second to this
--tpslimit-burst int Max burst of transactions for --tpslimit (default 1) --tpslimit-burst int Max burst of transactions for --tpslimit (default 1)
--use-cookies Enable session cookiejar --use-cookies Enable session cookiejar
--user-agent string Set the user-agent to a specified string (default \[dq]rclone/v1.68.2-beta.8335.a85292ca0.feature/add-container-zones-support\[dq]) --user-agent string Set the user-agent to a specified string (default \[dq]rclone/v1.68.2-beta.8339.71f0cdbd4.feat/frostfs_info_cmd\[dq])
\f[R] \f[R]
.fi .fi
.SS Performance .SS Performance
@ -46090,6 +46090,94 @@ Env Var: RCLONE_FROSTFS_DESCRIPTION
Type: string Type: string
.IP \[bu] 2 .IP \[bu] 2
Required: false Required: false
.SS Backend commands
.PP
Here are the commands specific to the frostfs backend.
.PP
Run them with
.IP
.nf
\f[C]
rclone backend COMMAND remote:
\f[R]
.fi
.PP
The help below will explain what arguments each command takes.
.PP
See the backend (https://rclone.org/commands/rclone_backend/) command
for more info on how to pass options and arguments.
.PP
These can be run on a running backend using the rc command
backend/command (https://rclone.org/rc/#backend-command).
.SS info
.PP
Show information about the FrostFS objects and containers
.IP
.nf
\f[C]
rclone backend info remote: [options] [<arguments>+]
\f[R]
.fi
.PP
This command can be used to get information about the FrostFS objects
and containers.
.PP
Usage Examples:
.IP
.nf
\f[C]
rclone backend info frostfs:container/path/to/dir
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt
rclone backend info frostfs:container/path/to/dir path/to/file/in/dir.txt -o \[dq]format={cid}:{oid}\[dq]
\f[R]
.fi
.PP
The optional \[dq]format\[dq] flag overrides the information output.
In this example, if an object is stored in a container with the
identifier \[dq]9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1\[dq] and
its own identifier is
\[dq]4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP\[dq], the output of
this command will be
\[dq]9mvN7hsucoGoHjxPqrWmDipnMaemGVDqrxxPyynn1:4VpcNFsZqsQt1Gnfw2utBnzn5Blgc7i4kvtuXyKyJp\[dq].
.PP
The default output format is the same as that of the frostfs-cli
utility, with the \[dq]container get\[dq] and \[dq]object head\[dq]
options.
Here is an example of output:
.IP
.nf
\f[C]
--- Container info ---
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner ID: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
Created: 2025-02-17 15:07:51 +0300 MSK
Attributes:
Timestamp=1739794071
Name=test
__SYSTEM__NAME=test
__SYSTEM__ZONE=container
__SYSTEM__DISABLE_HOMOMORPHIC_HASHING=true
Placement policy:
REP 3
--- Object info ---
ID: 4VPCNFsZ2SQt1GNfYw2uTBNnz5bLgC7i4k4ovtuXKyJP
CID: 9mvN7hsUcYoGoHjxpRWtqmDipnmaeRmGVDqRxxPyy2n1
Owner: NQL7q6PvPaisWNwdWfoR1LsEsAyje8P3jX
CreatedAt: 559
Size: 402905
HomoHash: <empty>
Checksum: 2a068fe24c53bc8bf7d6bbb997414f7938b080305dc45f9fd3ff684bc11fbb7b
Type: REGULAR
Attributes:
FileName=cat.png
FilePath=/dir1/dir2/dir3/cat.png
Timestamp=1733410524 (2024-12-05 17:55:24 +0300 MSK)
ID signature:
public key: 026b7c7a7a16225eb13a5a733495a1bcdd1f016dfa9193498821379b0de2ba6870
signature: 049f6712c8378d323269b605a282bcacd7565ce2eefe1f10a9739c48945f739d95102c478b9cb1d429cd3330b4b5262e725392e322de3bbfa4ce18a9c842289219
\f[R]
.fi
.SH FTP .SH FTP
.PP .PP
FTP is the File Transfer Protocol. FTP is the File Transfer Protocol.