All Products
Search
Document Center

Object Storage Service:Reduce the risks of data loss caused by accidental operations

Last Updated:Oct 24, 2023

Accidental deletions of data are common and can affect business operations. This topic describes the preventive methods that you can use to prevent data loss related to accidental operations.

Important

The following best practices are a set of general rules, not complete security solutions. These best practices are provided only for reference and may not suit your business scenarios. We recommend that you remain aware of data security threats and take the necessary precautions and preventative measures.

Enable versioning for a bucket

Object Storage Service (OSS) allows you to configure versioning for a bucket to protect objects that are stored in the bucket. When you overwrite or delete objects that are stored in a versioning-enabled bucket, OSS saves the objects as previous versions in the bucket. Versioning allows you to recover a previous version of an object to protect the object from being accidentally overwritten or deleted.

When versioning is enabled for a bucket, OSS specifies a unique ID for each version of an object stored in the bucket. For more information about versioning, see Overview.

Enable CRR for a bucket

Cross-region replication (CRR) performs automatic and asynchronous (near real-time) replication of objects across buckets in different OSS regions. Operations such as creating and overwriting objects can be synchronized from a source bucket to a destination bucket.

CRR can meet your requirements for cross-region disaster recovery and data replication. You can specify the Add/Change replication policy in a CRR rule to prevent data losses from accidental deletions.

This way, if data is accidentally deleted from a source bucket, you can recover the deleted data by retrieving its copy from the destination bucket.

For more information about CRR, see Overview.

Configure scheduled backup for a bucket

OSS provides the scheduled backup feature that you can use to back up objects in a bucket to Cloud Backup on a regular basis. If an object is accidentally lost, you can recover the object from Cloud Backup.

After you configure a scheduled backup plan for a bucket, Cloud Backup backs up all objects in the bucket from the specified start time and retains the backups in the vault for a specified period of time based on the retention policy. For more information about how to configure scheduled backup, see Configure scheduled backup.

After Cloud Backup completes a full backup, you can create an OSS restore job in the Cloud Backup console to recover an object accidentally deleted from the bucket to the version before the object was deleted. For more information, see Create an OSS restore job.