Manage buckets
Last updated:Jun 8, 2023
Manage buckets
A bucket is a container for objects.1 It is similar to a folder that contains files. You can create a bucket on C2 Object Storage service and give it a globally unique name.2 On the C2 Object Storage service, you can create up to 100 buckets.
On C2 Object Storage web portal > Buckets, you can create or delete buckets, and view your created buckets in terms of size of used space, object count, and the endpoint URL.3
Notes:
- An object can be seen as a set of file and the metadata that describes the file.
- Bucket names must be unique within the C2 Object Storage service across different data centers. If another user has created a bucket, you cannot create a bucket with the same name.
- Creation of and changes made to buckets cannot be operated through APIs, but only through the web portal.
Create a bucket
- Click Create Bucket.
- Enter the Bucket name.1 Once a bucket is created, it cannot be renamed.
-
You can Create an access key for this bucket2 at the same time. Also, choose an access type:
- Read and Write
- Read Only
-
Data protection consists of two features:
- Bucket versioning: It stores multiple versions of the objects stored in this bucket.3
-
Object lock: It locks objects' versions for a specified period of time so as to prevent deletions.4 Enabling object lock will also enable the versioning feature.5
- If you select Set default retention period, any future uploads via the web portal (or via an API call without the retention period parameter) onto this bucket will be locked automatically for the specified number of days. You can choose from the drop-down menu or directly enter your desired number of days.
- Download the Access Key ID and Secret Key to your computer and save them carefully. Note that the secret key will not show again once this dialog box is closed.
- The newly created bucket will be displayed in the bucket list.
Notes:
-
Naming rules for a bucket:
- The length must be between 3 and 63 characters.
- Only lowercase letters (a-z), numbers (0-9), and hyphens (-) are accepted.
- Hyphens cannot be put at the beginning or the end.
- If you don't create an access key now, you can also create it later on the Access Keys page.
For more information on APIs and their limitations, refer to this article. - If you don't enable bucket versioning now, you can still enable it later.
- You have to determine whether to enable object lock or leave it disabled now. Once the bucket is created, you cannot change the status of object lock anymore.
- Since object lock relies on bucket versioning, after the bucket creation, you cannot suspend the versioning feature anymore, either.
Delete a bucket
- Hover your mouse pointer over a bucket, click on the floating ⋮ button, and choose Delete bucket.
- Confirm that you want to Delete the bucket.
Notes:
- To keep the bucket name, you can just empty the bucket instead of delete it. If you delete the bucket, its name may be taken by other users.
- Before the bucket deletion, you have to empty the bucket (including all versions).
Set data protection
- Hover your mouse pointer over a bucket, click on the floating ⋮ button, and choose Set data protection.
- To store multiple versions of this bucket's objects, select Enable bucket versioning. In contrast, to suspend the versioning feature, deselect the checkbox.1 2 Then, click Save.
- Once you decide to enable the object lock feature or leave it disabled when creating a bucket, it cannot be changed anymore. However, if object lock has been enabled, you can still configure the default retention period. The change in default retention period is applied immediately, including to any running uploads.
Notes:
- Once enabled, the bucket versioning function will not be disabled again. Deselecting Enable bucket versioning will only suspend this function (i.e., stop storing new versions), while the existing versions will remain.
- Object lock relies on the versioning feature. If the bucket is enabled with object lock when created, the versioning feature cannot be suspended anymore.
Manage objects in your buckets
Click on a bucket to explore the objects and folders in the bucket. You can see the path of folder which you are currently exploring.
A page can list up to 10,000 items (including folders and objects) only. You can view more than the maximum limit of items through API calls.
Upload objects/folders
- In a bucket, go to the folder where you want to upload your data, drag and drop the files/folders from your client computer to the web portal.1 2
-
During and after the upload, you can view the upload tasks and do the following:
- Click
to cancel a single file upload.
- Click Cancel All to stop the upload task. Files/folders that are already uploaded will not be deleted. You can manually delete them later.
- Click Clear Completed Items so that the task box will display the unfinished tasks only.
- Click
- Note that, once created or uploaded, an object/folder cannot be renamed, and cannot be moved from a folder to another on C2 Object Storage.
Download an object
- Hover your mouse pointer over an object, and click on the floating download button (
).
- Note that you can download a single object at a time through the web portal.
Delete objects/folders
- Tick to select the objects/folders you want to delete.
- Click Delete.
- Confirm to delete the selected objects/folders.
Notes:
- The file/folder name cannot ends with a forward slash (/), which may be allowed on certain Mac platform.
- Newly uploaded objects will overwrite the existing ones with the same name (including the file extension) on your C2 Object Storage.