Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Deleting an Object

Updated on 2024-11-26 GMT+08:00

Scenarios

To save space and money, you can use OBS Console, the API, SDKs, OBS Browser+, or obsutil to delete unneeded objects.

The following describes how to manually delete objects. For details about the comparison between manual and automatic deletion, see Table 1.

Table 1 Object deletion methods

Method

Description

Rule

Manual deletion

Manual deletion is recommended for deleting a few or irregular objects.

  • Individual deletion
  • Batch deletion

Automatic deletion

To delete a large number of objects at a time or delete some objects periodically, you can configure lifecycle rules.

NOTE:

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 time out. To address this problem, you are advised to delete directories in either of the following ways:

  1. On the Hadoop client that has OBSA, an OBS client plugin, embedded, run the hadoop fs - rmr obs://{Name of a parallel file system}/{Directory name} command.
  2. Configure a lifecycle rule for directories so that they can be deleted in background based on the preset lifecycle rule.

Deleting Objects from a Bucket with Versioning Disabled, Suspended, or Enabled

Deleting objects may cause data loss. Exercise caution when performing this operation. Versioning can reduce the risk by restoring objects that are accidentally deleted or overwritten.

Scenario

Deleting the Current Object Version

Deleting a Noncurrent Object Version

A versioning-disabled bucket

OBS permanently deletes objects. Deleted objects cannot be recovered.

N/A

A versioning-suspended bucket

  • If an object's current version does not have a delete marker and its version ID is not null, the object deletion operation turns the current version into a noncurrent version and inserts a delete marker with an ID of null. The delete marker then becomes the current version.
  • If an object's current version does not have a delete marker and its version ID is null, the object deletion operation inserts a delete marker with an ID of null that overwrites the current version. The delete marker then becomes the current version, and the overwritten version cannot be recovered.
  • If the current version has a delete marker, no action is taken.
    NOTE:
    • After versioning is suspended, a newly uploaded object will have a version ID of null. If the newly uploaded object has the same name as an existing object with a null version ID, this new object will overwrite the existing object. For more information about versioning, see Versioning.
    • By enabling Historical Versions in the object list, you can view the version ID of an object.

Deleted noncurrent versions cannot be recovered.

A versioning-enabled bucket

  • If an object's current version does not have a delete marker, the object deletion operation inserts a delete marker. Then, the current version becomes a noncurrent version and the delete marker becomes the current version.
  • If the current version has a delete marker, no action is taken.
    NOTE:
    • To permanently delete an object, delete it again from the Deleted Objects list.
    • To recover a deleted object, undelete it from the Deleted Objects list. For details, see Undeleting an Object.

Deleted noncurrent versions cannot be recovered.

Ways to Delete Objects

You can use OBS Console, APIs, SDKs, OBS Browser+, or obsutil to delete objects (folders included).

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback