이 페이지에서는 Google Distributed Cloud (GDC) 오프라인 환경 내에서 스토리지 버킷의 보관 기간을 설정하는 방법을 안내합니다. GDC 콘솔과 명령줄 인터페이스 (CLI)를 모두 사용하여 스토리지 버킷 내에 데이터를 보관해야 하는 기간을 정의하기 위한 기본 요건과 단계를 설명합니다. 이 정보는 규제 및 데이터 관리 요구사항을 충족하는 데 도움이 됩니다.
이 페이지는 GDC 오프라인 환경에서 스토리지 버킷 설정을 구성하고 관리하는 인프라 운영자 그룹의 IT 관리자 또는 애플리케이션 운영자 그룹의 개발자와 같은 사용자를 대상으로 합니다. 자세한 내용은 GDC 오프라인 문서 대상을 참고하세요.
시작하기 전에
프로젝트 네임스페이스는 관리 API 서버에서 버킷 리소스를 관리합니다. 버킷 및 객체로 작업하려면 프로젝트가 있어야 합니다.
다음 작업을 수행하려면 적절한 버킷 권한도 있어야 합니다. 버킷 액세스 권한 부여를 참고하세요.
버킷 보관 기간 설정
콘솔
탐색 메뉴에서 객체 스토리지를 클릭합니다.
업데이트하려는 버킷의 이름을 클릭합니다.
구성 탭을 클릭합니다.
보안 섹션의 보관 정책 필드 옆에 있는 edit수정을 클릭합니다.
기존 일수보다 큰 값으로 일수를 수정하고 저장을 클릭합니다.
CLI
기본적으로 언제든지 객체를 삭제할 수 있습니다. 보관 기간을 사용하여 객체 잠금을 사용 설정하면 지정된 일수 동안 버킷의 모든 객체가 삭제되지 않습니다. 보관 기간이 지난 후 모든 객체를 삭제해야 버킷을 삭제할 수 있습니다.
버킷을 만들 때 객체 잠금을 사용 설정해야 합니다. 버킷을 만든 후에는 객체 잠금을 사용 설정하거나 사용 중지할 수 없습니다. 하지만 기본 객체 보관 기간은 수정할 수 있습니다.
객체 잠금을 사용 설정하거나 사용 중지한 상태로 버킷을 만들 수 있습니다. 객체 잠금을 사용 설정한 경우 기본 보관 기간을 지정하지 않아도 됩니다.
보관 기간을 수정하려면 버킷 리소스에서 Bucket.spec.buckePolicy.lockingPolicy.defaultObjectRetentionDays 필드를 업데이트합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\u003cp\u003eThis document outlines how to set and modify retention periods for Google Distributed Cloud (GDC) air-gapped storage buckets, which prevents objects from being deleted before the specified period.\u003c/p\u003e\n"],["\u003cp\u003eObject locking must be enabled when the bucket is created, and while it cannot be enabled or disabled after bucket creation, the default object retention period can be modified.\u003c/p\u003e\n"],["\u003cp\u003eYou can set the default object retention period via the console by updating the "Retention policy" field or using the command-line interface (CLI) by modifying the \u003ccode\u003eBucket.spec.buckePolicy.lockingPolicy.defaultObjectRetentionDays\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eUpdating the retention period only affects objects created after the update; pre-existing objects are not impacted by changes to the retention period.\u003c/p\u003e\n"],["\u003cp\u003eWhen object locking is enabled, attempting to overwrite an object results in a new version being created, allowing users to retrieve both versions of the object.\u003c/p\u003e\n"]]],[],null,["# Set storage bucket retention periods\n\nThis page guides you through how to set retention periods for storage buckets within Google Distributed Cloud (GDC) air-gapped environments. It covers the prerequisites and the steps for defining the length of time that data must be retained within a storage bucket using both the GDC console and command line interface (CLI). This information helps you meet your regulatory and data management requirements.\n\nThis page is for audiences such as IT administrators within the infrastructure operator group or developers within the application operator group who are responsible for configuring and managing storage bucket settings in GDC air-gapped environments. For more information, see [Audiences for GDC air-gapped documentation](/distributed-cloud/hosted/docs/latest/gdch/resources/audiences).\n\nBefore you begin\n----------------\n\nA project namespace manages bucket resources in the Management API server. You\nmust have a [project](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/project-management) to work with buckets and objects.\n\nYou must also have the appropriate bucket permissions to perform the following\noperation. See [Grant bucket access](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/grant-obtain-storage-access#grant_bucket_access).\n\nSet a bucket retention period\n-----------------------------\n\n### Console\n\n1. In the navigation menu, click **Object Storage**.\n2. Click the name of the bucket that you want to update.\n3. Click the **Configuration** tab.\n4. In the Security section, next to the **Retention policy** field, click edit **Edit**.\n5. Edit the number of days with a value higher than the existing number of days and click **Save**.\n\n### CLI\n\nBy default, you can delete objects at any time. You can enable object locking\nwith a retention period to prevent all objects in the bucket from deletion for\nthe specified number of days. You cannot delete a bucket until you\ndelete all objects after the retention period.\n\nYou must enable object locking when creating the bucket. You cannot enable or\ndisable object locking after you create a bucket. However, you can modify the\ndefault object retention period.\n\nYou can create a bucket with or without enabling object locking. If you've\nenabled object locking, specifying a default retention period is optional.\n\nTo modify the retention period, update the\n`Bucket.spec.buckePolicy.lockingPolicy.defaultObjectRetentionDays` field in the\n[Bucket resource](../../apis/storage-krm-api.md).\n\nThe following is an example of updating the field in the Bucket resource: \n\n apiVersion: object.gdc.goog/v1\n kind: Bucket\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBUCKET_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eNAMESPACE_NAME\u003c/span\u003e\u003c/var\u003e\n spec:\n description: \"This bucket has a default retention period specified.\"\n storageClass: Standard\n bucketPolicy:\n lockingPolicy:\n defaultObjectRetentionDays: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eRETENTION_DAY_COUNT\u003c/span\u003e\u003c/var\u003e\n ----------\n apiVersion: object.gdc.goog/v1\n kind: Bucket\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBUCKET_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eNAMESPACE_NAME\u003c/span\u003e\u003c/var\u003e\n spec:\n description: \"This would enable object locking but not specify a default retention period.\"\n storageClass: Standard\n bucketPolicy:\n lockingPolicy:\n ----------\n apiVersion: object.gdc.goog/v1\n kind: Bucket\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eBUCKET_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eNAMESPACE_NAME\u003c/span\u003e\u003c/var\u003e\n spec:\n description: \"This bucket does not have locking or retention enabled.\"\n storageClass: Standard\n\nAny updates to the retention period apply to objects created in the bucket after\nthe update. For pre-existing objects, the retention period does not change.\n\nWhen you've enabled object locking, if you attempt to overwrite an object, you add a new\nversion of the object. You can retrieve both object versions. To retrieve object versions, see [List storage objects](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/list-storage-objects).\n\nTo create a write-once, read-many (WORM) bucket, refer to the\n[WORM Bucket](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/create-storage-worm-buckets) section."]]