Skip to content

Instantly share code, notes, and snippets.

@samos123
Created June 25, 2016 09:49
Show Gist options
  • Save samos123/07d987b6a1afacf85d3fa6c2d7b63a9a to your computer and use it in GitHub Desktop.
Save samos123/07d987b6a1afacf85d3fa6c2d7b63a9a to your computer and use it in GitHub Desktop.
export images and volume snapshots from OpenStack Ceph RBD
#!/bin/bash
set -xe
imageid=$1
qemu-img convert -f raw -O qcow2 rbd:images/$imageid $imageid.qcow2
#!/bin/bash
set -xe
snapid=$1
volid=$(cinder snapshot-show $snapid | grep volume_id | awk '{ print $4 }')
qemu-img convert -f raw -O qcow2 rbd:volumes/volume-$volid@snapshot-$snapid $snapid.qcow2
@brunobernardi
Copy link

Thanks @samos123 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment