Simple app to export rbd images from a ceph pool, based on the last snapshot.
$ ./export.py --help
Usage: export.py [OPTIONS] POOL [IMAGES]...
Exports rbd images in POOL to vmdk, based on the last snapshot.
Options:
--path TEXT Path where to store the exported images.
--image-pattern TEXT Pattern to filter the images.
--snap-pattern TEXT Pattern to filter the snapshots.
--debug / --no-debug Debug and dry-run mode.
--help Show this message and exit.
$ ./export.py pve-images vm-100-disk-1 vm-101-disk-1 --path=/srv/tank/vmdk
$ ls -al /srv/tank/vmdk
[email protected]
[email protected]
$ ./export.py pve-images --path=/srv/tank/vmdk
$ ls -al /srv/tank/vmdk
[email protected]
[email protected]
[email protected]
...
$ ./export.py pve-images vm-100-disk-1 vm-101-disk-1 --path=/srv/tank/qcow2 --format=qcow2
$ ls -al /srv/tank/qcow2
[email protected]
[email protected]