「Ceph」- 块存储 快照(Snapshot)

  CREATED BY JENKINSBOT

创建快照:

# rbd snap create <pool name>/<image name>@<snap name>
# rbd snap create rbd/rbd1@snapshot1

删除快照:

# rbd snap rm <pool-name>/<image-name>@<snap-name>
# rbd snap rm rbd/rbd1@snapshot1 --name client.rbd

// 删除所有快照

# rbd snap purge <pool-name>/<image-name>
# rbd snap purge rbd/rbd1 --name client.rbd

修改快照:

# rbd snap rename <pool-name>/<image-name>@<original-snapshot-name> <pool-name>/<image-name>@<new-snapshot-name>
# rbd snap rename rbd/rbd1@snapshot1 rbd/rbd1@snapshot1_new

查看快照:

# rbd snap ls <pool name>/<image name>
# rbd snap ls rbd/rbd1

从快照恢复数据:

# rbd snap rollback <pool-name>/<image-name>@<snap-name>

# umount /mnt/ceph-disk1
# rbd snap rollback rbd/rbd1@snapshot1 --name client.rbd