Working with RBD snapshots

Ceph extends full support to snapshots, which are point-in-time, read-only copies of an RBD image. You can preserve the state of a Ceph RBD image by creating snapshots and restoring the snapshot to get the original data.

How to do it…

Let's see how a snapshot works with Ceph.

  1. To test the snapshot functionality of Ceph, let's create a file on the block device that we created earlier:
    # echo "Hello Ceph This is snapshot test" > /mnt/ceph-disk1/snapshot_test_file
    How to do it…
  2. Create a snapshot for the Ceph block device:

    Syntax: rbd snap create <pool-name>/<image-name>@<snap-name>

    # rbd snap create rbd/rbd1@snapshot1 --name client.rbd
    
  3. To list ...

Get Ceph Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.