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 Thanks, Kazutaka MORITA Kazutaka (4): collie: add helper function to read vdi objects collie: add vdi backup support collie: vdi restore support tests: add test to check vdi backup and restore collie/common.c | 2 + collie/vdi.c | 516 +++++++++++++++++++++++++++++++++++++++++++------------ man/collie.8 | 6 + tests/041 | 72 ++++++++ tests/041.out | 64 +++++++ tests/group | 1 + 6 files changed, 549 insertions(+), 112 deletions(-) create mode 100755 tests/041 create mode 100644 tests/041.out -- 1.7.2.5 |