summaryrefslogtreecommitdiff
path: root/yarns/0030-basics.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-12-04 19:11:51 +0000
committerLars Wirzenius <liw@liw.fi>2013-12-04 19:11:51 +0000
commit606a452e51a6508fcd0a962f84549ab02444137c (patch)
tree67ab963e29afe64b09cbe568d14bb28f0b90a8e8 /yarns/0030-basics.yarn
parent4640a881c2263cc2cfcb6a0ed3f75170e93284da (diff)
downloadobnam-606a452e51a6508fcd0a962f84549ab02444137c.tar.gz
Add test for backing up sparse files
Diffstat (limited to 'yarns/0030-basics.yarn')
-rw-r--r--yarns/0030-basics.yarn25
1 files changed, 25 insertions, 0 deletions
diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn
index 7cdc3ba7..0106eb0d 100644
--- a/yarns/0030-basics.yarn
+++ b/yarns/0030-basics.yarn
@@ -22,3 +22,28 @@ program must be able to handle.
WHEN user backs up live data
THEN user can restore their data correctly
AND user can fsck the repository
+
+Backup sparse files
+-------------------
+
+Sparse files present an interesting challenge to backup programs. Most
+people have none, but some people have lots, and theirs can have very
+large holes. For example, at work I often generate disk images as
+raw disk images in sparse files. The image may need to be, say 30
+gigabytes in size, even though it only contains one or two gigabyte of
+data. The rest is a hole.
+
+A backup program should restore a sparse file as a sparse file.
+Otherwise, the 30 gigabyte disk image file will, upon restore, use 30
+gigabytes of disk space, rather than one. That might make restoring
+impossible.
+
+Unfortunately, it is not easy to (portably) check whether a file is
+sparse. We'll settle for making sure the restored file does not use
+more disk space than the one in live data.
+
+ SCENARIO backup a sparse file
+ GIVEN a file S in live data, with a hole, data, a hole
+ WHEN user backs up live data
+ THEN user can restore their data into X
+ AND restored file S in X doesn't use more disk