이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 8. Snapshot Basics


The following procedures demonstrate how to create, list, and remove snapshots using the rbd command on the command line.

8.1. Create Snapshot

To create a snapshot with rbd, specify the snap create option, the pool name and the image name:

rbd --pool {pool-name} snap create --snap {snap-name} {image-name}
rbd snap create {pool-name}/{image-name}@{snap-name}
Copy to Clipboard Toggle word wrap

For example:

rbd --pool rbd snap create --snap snapname foo
rbd snap create rbd/foo@snapname
Copy to Clipboard Toggle word wrap

8.2. List Snapshots

To list snapshots of an image, specify the pool name and the image name:

rbd --pool {pool-name} snap ls {image-name}
rbd snap ls {pool-name}/{image-name}
Copy to Clipboard Toggle word wrap

For example:

rbd --pool rbd snap ls foo
rbd snap ls rbd/foo
Copy to Clipboard Toggle word wrap

8.3. Rollback Snapshot

To rollback to a snapshot with rbd, specify the snap rollback option, the pool name, the image name and the snap name:

rbd --pool {pool-name} snap rollback --snap {snap-name} {image-name}
rbd snap rollback {pool-name}/{image-name}@{snap-name}
Copy to Clipboard Toggle word wrap

For example:

rbd --pool rbd snap rollback --snap snapname foo
rbd snap rollback rbd/foo@snapname
Copy to Clipboard Toggle word wrap
Note

Rolling back an image to a snapshot means overwriting the current version of the image with data from a snapshot. The time it takes to execute a rollback increases with the size of the image. It is faster to clone from a snapshot than to rollback an image to a snapshot, and it is the preferred method of returning to a pre-existing state.

8.4. Delete a Snapshot

To delete a snapshot with rbd, specify the snap rm option, the pool name, the image name and the username:

rbd --pool {pool-name} snap rm --snap {snap-name} {image-name}
rbd snap rm {pool-name}/{image-name}@{snap-name}
Copy to Clipboard Toggle word wrap

For example:

rbd --pool rbd snap rm --snap snapname foo
rbd snap rm rbd/foo@snapname
Copy to Clipboard Toggle word wrap
Note

Ceph OSDs delete data asynchronously, so deleting a snapshot doesn’t free up the disk space immediately.

8.5. Purge Snapshots

To delete all snapshots for an image with rbd, specify the snap purge option and the image name:

rbd --pool {pool-name} snap purge {image-name}
rbd snap purge {pool-name}/{image-name}
Copy to Clipboard Toggle word wrap

For example:

rbd --pool rbd snap purge foo
rbd snap purge rbd/foo
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat