Overview
TCR allows users to set up rules to remove unused image tags of the Enterprise Edition instances in batch. However, after you delete the image tags, the image data stored in the COS bucket associated with the instance still exists. You can use the garbage collection feature to delete the invalid image tag data in COS bucket to release the occupied storage capacity, and reduce the storage costs. This document describes how to use the garbage collection feature to release the occupied storage capacity of a COS bucket.
Notes
Garbage collection will affect the instance service status and the data in your instance. Please note the following points:
During garbage collection, the instance becomes read-only. You can pull images from image repositories, but cannot push images to the image repositories.
The garbage collection task will clean up the image layer data that is no longer associated with valid image tags in all image repositories of the instance. The deletion operation is irreversible. We recommend that you perform a dry run to evaluate the impacts before performing garbage collection.
The time required for the garbage collection task depends on the image data size stored in the COS bucket and the number of historical image tags. Temporary suspension of tasks is not supported. We recommend that you perform the garbage collection tasks during non-business time, or perform a dry run to estimate the required time.
Directions
Performing a dry run
1. Log in to the TCR console and click Garbage Collection in the left sidebar. 2. On the Garbage Collection page, view the garbage collection tasks of the current instance. To change the instance, select the required instance name from the Instance Name drop-down list at the top of the page.
3. Click Dry run and read the notes carefully.
Note
In a dry run, the instance is fully scanned for unused data. You can estimate the cleanup range and the required time. During the dry run, the instance's basic features are not affected. You can still pull and push images. However, the intensive computing tasks of the cleanup may affect the speed of image pulling and push.
4. Click OK.
Running garbage collection
1. Log in to the TCR console and click Garbage Collection in the left sidebar. 2. On the Garbage Collection page, view the garbage collection tasks of the current instance. To change the instance, select the required instance name from the Instance Name drop-down list at the top of the page.
3. Click Run Garbage Collection and read the notes carefully.
Note
During garbage collection, the instance becomes read-only. You can pull images from image repositories, but cannot push images to the image repositories. The time required for the job depends on the data size and usage duration of the instance.
4. Click OK.
문제 해결에 도움이 되었나요?