You can suspend versioning to stop new versions of the same object from accumulating in a bucket. After you suspend versioning, you can still upload objects and download or delete historical object versions.
Upload objects
When you upload an object to a versioning-suspended bucket:
-
The newly uploaded object becomes the current version. Existing historical versions are retained.
-
If you upload an object that has the same name as an existing object, the new object overwrites the version uploaded during the suspension period but does not affect versions created before versioning was suspended.
You can use the cp (upload objects) command provided by ossutil and the following OSS SDKs to upload objects to a versioning-suspended bucket: OSS SDK for Java, OSS SDK for PHP, OSS SDK for Node.js, OSS SDK for Python,OSS SDK for .NET, OSS SDK for Go, and OSS SDK for C++.
Download objects
OSS allows you to download the current or specified version of an object from a versioning-suspended bucket.
-
If you do not specify a version ID in a GET request, OSS returns the current version.
-
To download a specific historical version, specify its version ID in the GET request.
You can use the cp (download objects) command provided by ossutil and the following OSS SDKs to download objects from a versioning-suspended bucket: OSS SDK for Java, OSS SDK for PHP, OSS SDK for Node.js, OSS SDK for Python,OSS SDK for .NET, OSS SDK for Go, and OSS SDK for C++.
Delete objects
When you send a DELETE request to a versioning-suspended bucket:
-
If you do not specify a version ID, the object is marked as deleted and its historical versions are retained. If a delete marker for the same object already exists from the suspension period, the new marker overwrites it.
-
If you specify a version ID, the specified object version is permanently deleted.
You can use the rm command provided by ossutil and the following OSS SDKs to delete objects from a versioning-suspended bucket: OSS SDK for Java, OSS SDK for PHP, OSS SDK for Node.js, OSS SDK for Python,OSS SDK for .NET, OSS SDK for Go, and OSS SDK for C++.