[sheepdog] [PATCH 0/4] add vdi backup and restore support
Liu Yuan
namei.unix at gmail.com
Mon Sep 10 09:29:28 CEST 2012
On 09/10/2012 12:41 AM, MORITA Kazutaka wrote:
> An incremental backup is useful to reduce backup data size. This
> series adds support for vdi backup and restore commands. With theses
> patches, we can create incremental backup files between snapshots as
> follows.
>
> $ collie vdi create test 4G
> $ echo snap1 | collie vdi write test 0 512
> $ collie vdi snapshot test -s snap1
> $ echo snap2 | collie vdi write test 0 512
> $ collie vdi snapshot test -s snap2
>
> (create an incremental backup between snap1 and snap2)
> $ collie vdi backup test -F snap1 -s snap2 /tmp/backup
> $ collie vdi list
> Name Id Size Used Shared Creation time VDI id Copies Tag
> s test 1 4.0 GB 4.0 MB 0.0 MB 2012-09-10 01:27 7c2b25 1 snap1
> s test 2 4.0 GB 4.0 MB 0.0 MB 2012-09-10 01:28 7c2b26 1 snap2
> test 3 4.0 GB 0.0 MB 4.0 MB 2012-09-10 01:28 7c2b27 1
>
> (restore vdi with the backup file)
> $ collie vdi restore test -s snap1 /tmp/backup
> restoring /tmp/backup... done
>
> (restored image is created as a new snapshot [id=3])
> $ collie vdi tree
> test---[2012-09-10 01:27]-+-[2012-09-10 01:28]---(you are here)
> `-[2012-09-10 01:29]
> $ collie vdi list
> Name Id Size Used Shared Creation time VDI id Copies Tag
> s test 1 4.0 GB 4.0 MB 0.0 MB 2012-09-10 01:27 7c2b25 1 snap1
> s test 2 4.0 GB 4.0 MB 0.0 MB 2012-09-10 01:28 7c2b26 1 snap2
> s test 3 4.0 GB 4.0 MB 0.0 MB 2012-09-10 01:29 7c2b28 1
> test 4 4.0 GB 0.0 MB 4.0 MB 2012-09-10 01:29 7c2b29 1
> $ collie vdi read test 0 512 -s 3
> snap2
Applied, thanks.
Yuan
More information about the sheepdog
mailing list