forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
31 lines
7.8 KiB
HTML
31 lines
7.8 KiB
HTML
<a name="en-us_topic_0045853756"></a><a name="en-us_topic_0045853756"></a>
|
|
|
|
<h1 class="topictitle1">Deleting an Object or Folder</h1>
|
|
<div id="body1499753333226"><div class="section" id="en-us_topic_0045853756__section13666357124317"><h4 class="sectiontitle">Scenarios</h4><p id="en-us_topic_0045853756__p57701715445">On OBS Console, you can manually delete unneeded files or folders to release space and reduce costs.</p>
|
|
<p id="en-us_topic_0045853756__p7916121265313">Alternatively, you can configure lifecycle rules to periodically, automatically delete some or all of the files and folders from a bucket. For details, see <a href="obs_03_0335.html">Configuring a Lifecycle Rule</a>.</p>
|
|
<p id="en-us_topic_0045853756__p104131716980">In big data scenarios, parallel file systems usually have deep directory levels and each directory has a large number of files. In such case, deleting directories from parallel file systems may fail due to timeout. To address this problem, you are advised to delete directories in either of the following ways:</p>
|
|
<ol id="en-us_topic_0045853756__ol737482317811"><li id="en-us_topic_0045853756__li4374102311819">On the Hadoop client that has OBSA, an OBS client plugin, embedded, run the <strong id="en-us_topic_0045853756__b383211288597">hadoop fs - rmr obs://{</strong><em id="en-us_topic_0045853756__i483252810596">Name of a parallel file system</em><strong id="en-us_topic_0045853756__b1983232810592">}/{</strong><em id="en-us_topic_0045853756__i8833142875916">Directory name</em><strong id="en-us_topic_0045853756__b138331528115911">}</strong> command.</li><li id="en-us_topic_0045853756__li58243252088">Configure <a href="obs_03_0335.html">a lifecycle rule</a> for directories so that they can be deleted in background based on the preset lifecycle rule.</li></ol>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0045853756__section4474995017112"><h4 class="sectiontitle">Background Information</h4><p id="en-us_topic_0045853756__p1083392434616"><strong id="en-us_topic_0045853756__en-us_topic_0066176932_b27993720241">Object Deletion with Versioning Enabled</strong></p>
|
|
<p id="en-us_topic_0045853756__p3811164916814">When versioning is enabled for a bucket, OBS works slightly different when deleting different objects.</p>
|
|
<ul id="en-us_topic_0045853756__ul188111049680"><li id="en-us_topic_0045853756__li58113497814">Deleting a file or folder: The file or folder is not permanently deleted, but is retained in the <strong id="en-us_topic_0045853756__b1019013713418">Deleted Objects</strong> list and marked with the <strong id="en-us_topic_0045853756__b3190937544">Delete Marker</strong>. In <strong id="en-us_topic_0045853756__b145986654812">Deleted Objects</strong>, click the object name. On the <strong id="en-us_topic_0045853756__b918773216485">Versions</strong> tab, you can see that the latest object version has the delete marker.<ul id="en-us_topic_0045853756__ul28125495811"><li id="en-us_topic_0045853756__li8812164914810">To permanently delete the file or folder, delete it again from the <strong id="en-us_topic_0045853756__b106151452142">Deleted Objects</strong> list. For details, see <a href="#en-us_topic_0045853756__section56466209">Procedure</a>.</li><li id="en-us_topic_0045853756__li138124491681">To recover the deleted file, undelete it from the <strong id="en-us_topic_0045853756__b9271416752">Deleted Objects</strong> list. For details, see <a href="en-us_topic_0066176932.html">Undeleting an Object</a>.</li></ul>
|
|
</li><li id="en-us_topic_0045853756__li108124498813">Deleting an object version: The version will be permanently deleted and cannot be recovered. If the deleted version is the latest one, the next latest version becomes the latest version.</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0045853756__section56466209"><a name="en-us_topic_0045853756__section56466209"></a><a name="section56466209"></a><h4 class="sectiontitle">Procedure</h4><ol id="en-us_topic_0045853756__ol36405904"><li id="en-us_topic_0045853756__li99821455306"><span>In the bucket list, click the bucket you want to operate. The <strong id="en-us_topic_0045853756__obs_03_0307_b144421021120">Overview</strong> page is displayed.</span></li><li id="en-us_topic_0045853756__li1733753692411"><span>In the navigation pane, choose <strong id="en-us_topic_0045853756__obs_03_0307_b51941856151917">Objects</strong>.</span></li><li id="en-us_topic_0045853756__li1463890417452"><span>Select the file or folder you want to delete and choose <strong id="en-us_topic_0045853756__b1994517127">More</strong> > <strong id="en-us_topic_0045853756__b2469696171138">Delete</strong> on the right.</span><p><p id="en-us_topic_0045853756__en-us_topic_0066036524_p18694614">You can select multiple files or folders and click <strong id="en-us_topic_0045853756__b1919669813155639">Delete</strong> above the object list to batch delete them.</p>
|
|
</p></li><li id="en-us_topic_0045853756__en-us_topic_0066036524_li34033799"><span>Click <strong id="en-us_topic_0045853756__b11509189151813">Yes</strong> to confirm the deletion.</span><p><div class="caution" id="en-us_topic_0045853756__note16884124153911"><span class="cautiontitle"><img src="public_sys-resources/caution_3.0-en-us.png"> </span><div class="cautionbody"><p id="en-us_topic_0045853756__p488414410392">If you delete an object from a bucket with versioning enabled, the object is not permanently deleted but retained in the <strong id="en-us_topic_0045853756__b799843610125">Deleted Objects</strong> list. All versions of the object are still kept in the bucket and are billed for storage. If you need to permanently delete the object, see the following steps.</p>
|
|
</div></div>
|
|
</p></li><li id="en-us_topic_0045853756__li15791184521118"><span>If versioning is enabled for the bucket, delete the files or folders again from the <strong id="en-us_topic_0045853756__b1489110814398">Deleted Objects</strong> list to permanently delete them.</span><p><ol type="a" id="en-us_topic_0045853756__ol1694911141313"><li id="en-us_topic_0045853756__li329516215438">Click <strong id="en-us_topic_0045853756__b1428610442012">Deleted Objects</strong>.</li><li id="en-us_topic_0045853756__li1725114121417">In the <strong id="en-us_topic_0045853756__b122564346399">Operation</strong> column of the file or folder to be deleted, click <strong id="en-us_topic_0045853756__b9196114171512">Permanently Delete</strong>.<p id="en-us_topic_0045853756__p63743352160">You can also select multiple files or folders and click <strong id="en-us_topic_0045853756__b12162648103917">Permanently Delete</strong> above the object list to batch delete them.</p>
|
|
</li></ol>
|
|
</p></li></ol>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0045853756__section089519314196"><a name="en-us_topic_0045853756__section089519314196"></a><a name="section089519314196"></a><h4 class="sectiontitle">Related Operations</h4><p id="en-us_topic_0045853756__p747615218216">When versioning is enabled, files in the <strong id="en-us_topic_0045853756__b118321213194311">Deleted Objects</strong> list also have multiple versions. Note the following points when deleting different versions of files:</p>
|
|
<ul id="en-us_topic_0045853756__ul680983374211"><li id="en-us_topic_0045853756__li4809233154212">Deleting a version with the <strong id="en-us_topic_0045853756__b124401227135111">Delete Marker</strong> actually recovers this version instead of permanently deleting it. For details, see <a href="en-us_topic_0066176932.html">Undeleting an Object</a>.</li><li id="en-us_topic_0045853756__li14809143354215">Deleting a version without the <strong id="en-us_topic_0045853756__b135921220165316">Delete Marker</strong> permanently deletes this version. This version will not be recovered even if the object is recovered later.</li></ul>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0315.html">Managing Objects</a></div>
|
|
</div>
|
|
</div>
|
|
|