OBS can store multiple versions of an object. You can quickly search for and restore different versions or restore data in the event of accidental deletions or application faults.
By default, the versioning function is disabled for new buckets on OBS. Therefore, if you upload an object to a bucket where an object with the same name exists, the new object will overwrite the existing one.
Figure 1 Versioning (with existing objects)

Figure 2 Versioning (for new objects)

Version | Description |
|---|---|
Latest version | After versioning is enabled, each operation on an object will result in saving of the object with a new version ID. The version ID generated upon the latest operation is called the latest version. |
Historical version | After versioning is enabled, each operation on an object will result in saving of the object with a new version ID. Version IDs generated upon operations other than the latest operation are called historical versions. |
Figure 3 Object with a delete marker

For example, after object A is deleted, it will appear in the Deleted Objects list. If you later upload another object with the same name A, the new object A will appear in the Objects list, but the previously deleted object A will disappear from the Deleted Objects list. For details, see Figure 4.
Figure 4 Uploading a namesake object after the original one is deleted

Once versioning is enabled for a bucket, it cannot be disabled, but it can be suspended. When versioning is suspended, a null, not a specific version ID, will be allocated to a newly uploaded object. If the newly uploaded object has the same name as an existing object with a null version ID, the new object will overwrite the existing object.
Figure 5 Object versions in the scenario when versioning is suspended

If versioning is no longer needed, you can suspend it. After versioning is suspended:
If you delete an object after versioning is suspended for the bucket, a delete marker will be created, regardless of whether the object has historical versions. But, if versioning is disabled, the same operation will not generate a delete marker.