This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.5.3.7. 볼륨 스냅샷 복원
VolumeSnapshot
CRD 콘텐츠를 사용하여 기존 볼륨을 이전 상태로 복원할 수 있습니다.
VolumeSnapshot
CRD가 바인딩되고 readyToUse
값이 true
로 설정된 후 해당 리소스를 사용하여 스냅샷에서 데이터로 미리 채워지는 새 볼륨을 프로비저닝할 수 있습니다. .사전 요구 사항 * 실행 중인 OpenShift Container Platform 클러스터에 로그인됩니다. * PVC(영구 볼륨 클레임) ) 볼륨 스냅샷을 지원하는 CSI(Container Storage Interface) 드라이버를 사용하여 생성됩니다. * 스토리지 백엔드를 프로비저닝하는 스토리지 클래스입니다. * 볼륨 스냅샷이 생성되었으며 사용할 준비가 되었습니다.
절차
다음과 같이 PVC에서
VolumeSnapshot
데이터 소스를 지정합니다.pvc-restore.yaml
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: myclaim-restore spec: storageClassName: csi-hostpath-sc dataSource: name: mysnap 1 kind: VolumeSnapshot 2 apiGroup: snapshot.storage.k8s.io 3 accessModes: - ReadWriteOnce resources: requests: storage: 1Gi
다음 명령을 입력하여 PVC를 생성합니다.
$ oc create -f pvc-restore.yaml
다음 명령을 입력하여 복원된 PVC가 생성되었는지 확인합니다.
$ oc get pvc
myclaim-restore
와 같은 새 PVC가 표시됩니다.