このコンテンツは選択した言語では利用できません。

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 では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat