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

Liu Yuan namei.unix at gmail.com
Tue Jun 3 14:51:48 CEST 2014


On Tue, Jun 03, 2014 at 04:59:26PM +0800, Ruoyu wrote:
> It is useful for users who want to backup or restore only part of
> all VDIs from cluster-wide snapshot.
> 
> To show which VDIs are snapshot, dog cluster snapshot show command
> is added.
> 
> Usage and example:
> 
> 1. save all vdi:
>    dog cluster snapshot save snapname /tmp/ss
> 
> 2. save some specified vdi:
>    dog cluster snapshot save snapname /tmp/ss test0 test1 test2
> 
> 3. load all vdi:
>    dog cluster snapshot load snapname /tmp/ss
> 
> 4. load some specified vdi:
>    dog cluster snapshot load snapname /tmp/ss test6 test0 test3
> 
> 5. show snapshot:
>    dog cluster snapshot show snapname /tmp/ss

I've tried the following command

yliu at ubuntu-precise:~/sheepdog$ dog/dog vdi list
  Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
s test         1  100 MB   12 MB  0.0 MB 2014-06-03 20:43   7c2b25      2            s1
s test         2  100 MB  4.0 MB  8.0 MB 2014-06-03 20:43   7c2b26      2            s2
s test         3  100 MB  4.0 MB  8.0 MB 2014-06-03 20:43   7c2b27      2            s3
  test         0  100 MB  0.0 MB   12 MB 2014-06-03 20:44   7c2b28      2              
yliu at ubuntu-precise:~/sheepdog$ dog/dog cluster snapshot list ./snap
Index		Tag		Snapshot Time
1		test		Tue Jun  3 20:45:05 2014
yliu at ubuntu-precise:~/sheepdog$ dog/dog cluster snapshot show test ./snap
The cluster-wide snapshot contains these VDIs:
hello



world

brazil

test
test
test

yliu at ubuntu-precise:~/sheepdog$ dog/dog cluster snapshot save test2 ./snap s1 s2
Object not found. It may be caused by:
1. The specified VDIs are not found.
2. The specified VDIs don't have snapshots.
Fail to save snapshot to path: ./snap.

-----

'show' doesn't work as expected. And seems that this patch can't save specified
snapshots. In above example, I want to save snapshots with the tag name 's1' and
's2' of the test tree.

Of you are intended to save just tip snapshots of specified snapshot name?

I'd suggest following

dog cluster snapshot save test2 ./snap test:s1 test:s2

command to save specified snapshots.

Thanks
Yuan



More information about the sheepdog mailing list