From 51ef67270b1d10e1fcf3de7368dccad1ba0bf9d1 Mon Sep 17 00:00:00 2001 From: edison Date: Tue, 21 Sep 2010 19:58:41 -0700 Subject: Copy snapshots out of QCOW2 disk In order to backup snapshots, created from QCOW2 iamge, we want to copy snapshots out of QCOW2 disk to a seperate storage. The following patch adds a new option in "qemu-img": qemu-img convert -f qcow2 -O qcow2 -s snapshot_name src_img bck_img. Right now, it only supports to copy the full snapshot, delta snapshot is on the way. Changes from V1: all the comments from Kevin are addressed: Add read-only checking Fix coding style Change the name from bdrv_snapshot_load to bdrv_snapshot_load_tmp Signed-off-by: Disheng Su Signed-off-by: Kevin Wolf --- block_int.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'block_int.h') diff --git a/block_int.h b/block_int.h index e8e7156..87e60b8 100644 --- a/block_int.h +++ b/block_int.h @@ -93,6 +93,8 @@ struct BlockDriver { int (*bdrv_snapshot_delete)(BlockDriverState *bs, const char *snapshot_id); int (*bdrv_snapshot_list)(BlockDriverState *bs, QEMUSnapshotInfo **psn_info); + int (*bdrv_snapshot_load_tmp)(BlockDriverState *bs, + const char *snapshot_name); int (*bdrv_get_info)(BlockDriverState *bs, BlockDriverInfo *bdi); int (*bdrv_save_vmstate)(BlockDriverState *bs, const uint8_t *buf, -- cgit v1.1