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

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Fri Aug 31 06:17:50 CEST 2012


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



More information about the sheepdog mailing list