[sheepdog] [PATCH] dog/cluster: cluster-wide snapshot save or load specified vdi

Ruoyu liangry at ucweb.com
Thu May 29 09:45:40 CEST 2014


On 2014年05月29日 15:34, Liu Yuan wrote:
> On Wed, May 28, 2014 at 08:43:02PM +0800, Ruoyu wrote:
>> It is useful for users who want to backup or restore only part of
>> all vdi from cluster-wide snapshot.
>>
>> Usage and example:
>>
>> 1. save all vdi:
>>     dog cluster snapshot save all /tmp/ss
>>
>> 2. save some specified vdi:
>>     dog cluster snapshot save test0_1_2 /tmp/ss test0 test1 test2
>>
>> 3. load all vdi:
>>     dog cluster snapshot load all /tmp/ss
>>
>> 4. load some specified vdi:
>>     dog cluster snapshot load all /tmp/ss test6 test0 test3
> We already give a name test0_1_2 for a snapshot that contain test{0,1,2}, so I
> think dog cluster snapshot snap_name would suffice.
'test0_1_2' is just a snapshot name, the format is
dog cluster snapshot save <snap_name> <path> [vdi1] [vdi2] [vdi3] ...
>
> I'd suggest following command:
>
> dog cluster snapshot save snap_name /path # save all the vdi
> dog cluster snapshot save snap_name /path vdi0:snap_name,vdi1:snap_name,... # partially save
I think "vdi1 vdi2 vdi3 ..." is better because I have successfully 
created the VDIs named as ',', ':', '_', etc.

$ dog vdi create _ 4M
$ dog vdi create : 4M
$ dog vdi create , 4M
$ dog vdi list
Name Id Size Used Shared Creation time VDI id Copies Tag
, 0 4.0 MB 0.0 MB 0.0 MB 2014-05-29 15:30 1884b 2
: 0 4.0 MB 0.0 MB 0.0 MB 2014-05-29 15:30 1adad 2
_ 0 4.0 MB 0.0 MB 0.0 MB 2014-05-29 15:30 2484e 2


> dog cluster snapshot load snap_name /path # load the specified snapshot, be it all or partial
> dog cluster snapshot list /path # list all the snapshot as before
> dog cluster snapshot show snap_name /path # show the saved vdis as in format
>
> name  snapid  snapname
> A       1       A_snap1
> A       2       A_snap2
> B       1       B_snap
> C       1       C_snap
>
> Thanks
> Yuan





More information about the sheepdog mailing list