[sheepdog] [PATCH 1/2] collie: add command 'collie vdi rollback'

levin li levin108 at gmail.com
Fri Aug 31 07:53:29 CEST 2012


On 08/31/2012 12:17 PM, MORITA Kazutaka wrote:
> At Thu, 30 Aug 2012 13:59:54 +0800,
> levin li wrote:
>>
>> From: levin li <xingke.lwp at taobao.com>
>>
>> With this command we can rollback a cloned VDI to any specified
>> snapshot, or easily reset to its parent VDI, the usage is easy.
>>
>> To rollback to a specified snapshot:
>>
>> $ collie vdi rollback -s 1 base_vdi clone_vdi
> 
> Do we need to go back to a snapshot of another vdi?
> 
> What I thought was like follows:
> 
>   $ collie vdi rollback -h
>   Usage: collie vdi check [-s snapshot] <vdiname>
> 
>   $ collie vdi create test 4G
>   $ collie vdi snapshot test -s snap1
>   $ collie vdi snapshot test -s snap2
>   $ collie vdi tree test
>   test---[2012-08-31 13:05]---[2012-08-31 13:06]---(you are here)
>   $ collie vdi list test
>     Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
>   s test         1  4.0 GB  0.0 MB  0.0 MB 2012-08-31 13:05   7c2b25     1         snap1
>   s test         2  4.0 GB  0.0 MB  0.0 MB 2012-08-31 13:06   7c2b26     1         snap2
>     test         3  4.0 GB  0.0 MB  0.0 MB 2012-08-31 13:07   7c2b27     1              
> 
>   $ collie vdi rollback test -s snap1
>   $ collie vdi tree test
>   test---[2012-08-31 13:05]-+-[2012-08-31 13:06]---[2012-08-31 13:07]
>                             `-(you are here)
>   $ collie vdi list test
>     Name        Id    Size    Used  Shared    Creation time   VDI id  Copies  Tag
>   s test         1  4.0 GB  0.0 MB  0.0 MB 2012-08-31 13:05   7c2b25     1         snap1
>   s test         2  4.0 GB  0.0 MB  0.0 MB 2012-08-31 13:06   7c2b26     1         snap2
>   s test         3  4.0 GB  0.0 MB  0.0 MB 2012-08-31 13:07   7c2b27     1              
>     test         4  4.0 GB  4.0 MB  0.0 MB 2012-08-31 13:08   7c2b28     1              
> 
> 
> Thanks,
> 
> Kazutaka
> 

Maybe I misunderstood you, but this patch can do more than you expected,
it's no harm for users to rollback a VDI to any snapshot if they choose to.

thanks,

levin




More information about the sheepdog mailing list