summaryrefslogtreecommitdiff
path: root/yarns/0030-basics.yarn
diff options
context:
space:
mode:
Diffstat (limited to 'yarns/0030-basics.yarn')
-rw-r--r--yarns/0030-basics.yarn44
1 files changed, 29 insertions, 15 deletions
diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn
index 34cad9d2..ae553c14 100644
--- a/yarns/0030-basics.yarn
+++ b/yarns/0030-basics.yarn
@@ -19,7 +19,7 @@ program must be able to handle.
SCENARIO backup simple data
GIVEN 100kB of new data in directory L
- AND a manifest of directory L in M
+ AND a manifest of L in M
WHEN user U backs up directory L to repository R
AND user U restores their latest generation in repository R into X
THEN L, restored to X, matches manifest M
@@ -46,7 +46,7 @@ more disk space than the one in live data.
SCENARIO backup a sparse file
GIVEN a file S in L, with a hole, data, a hole
- AND a manifest of directory L in M
+ AND a manifest of L in M
WHEN user U backs up directory L to repository R
AND user U restores their latest generation in repository R into X
THEN L, restored to X, matches manifest M
@@ -81,7 +81,20 @@ duplication.
SCENARIO backup non-basic filesystem objects
GIVEN directory L with interesting filesystem objects
- AND a manifest of directory L in M
+ AND a manifest of L in M
+ WHEN user U backs up directory L to repository R
+ AND user U restores their latest generation in repository R into X
+ THEN L, restored to X, matches manifest M
+
+As a special case, Obnam needs to notice when only an extended
+attribute value changes.
+
+ SCENARIO backup notices when extended attribute value changes
+ GIVEN a file F in L, with data
+ AND file L/F has extended attribute user.foo set to foo
+ WHEN user U backs up directory L to repository R
+ GIVEN file L/F has extended attribute user.foo set to bar
+ AND a manifest of L in M
WHEN user U backs up directory L to repository R
AND user U restores their latest generation in repository R into X
THEN L, restored to X, matches manifest M
@@ -95,8 +108,8 @@ assume that if we can backup two, then it'll all work well.
SCENARIO backup two roots
GIVEN directory L1 with interesting filesystem objects
AND directory L2 with interesting filesystem objects
- AND a manifest of directory L1 in M1
- AND a manifest of directory L2 in M2
+ AND a manifest of L1 in M1
+ AND a manifest of L2 in M2
WHEN user U backs up directories L1 and L2 to repository R
AND user U restores their latest generation in repository R into X
THEN L1, restored to X, matches manifest M1
@@ -117,16 +130,17 @@ backup, if the backup finishes successfully.
Restore a single file
---------------------
-We need to be able to restore only a single file.
+We need to be able to restore only a single file. Note that when
+restoring a single file, we do not set the parent directory's
+modification time according to the backup, so we need to manipulate
+the manifest to avoid getting an error.
SCENARIO restore a single file
GIVEN a file F in L, with data
- AND a manifest of directory L in M
- AND 100kB of new data in directory L
- AND manifest M has Mtime for the first entry set from L
+ AND a manifest of L/F in M
WHEN user U backs up directory L to repository R
AND user U restores file L/F to X from their latest generation in repository R
- THEN L, restored to X, matches manifest M
+ THEN L/F, restored to X, matches manifest M
Pretend backing up: the `--pretend` setting
-------------------------------------------
@@ -139,9 +153,9 @@ than a real one.
SCENARIO a pretend backup
GIVEN directory L with interesting filesystem objects
WHEN user U backs up directory L to repository R
- GIVEN a manifest of directory R in M1
+ GIVEN a manifest of R in M1
WHEN user U pretends to back up directory L to repository R
- GIVEN a manifest of directory R in M2
+ GIVEN a manifest of R in M2
THEN manifests M1 and M2 match
Exclude cache directories
@@ -162,7 +176,7 @@ The directory `L` now contains what we want to restore: only the
wanted data, no cache directory. This is a good time to create the
manifest.
- AND a manifest of directory L in M
+ AND a manifest of L in M
We now create the cache directory and tag it. Then we backup,
excluding caches, and restore, and verify. However, there's a snag:
@@ -203,7 +217,7 @@ create one. Test that such timestamps work.
SCENARIO pre-epoch timestamps
GIVEN file L/file has Unix timestamp -3600
- AND a manifest of directory L in M
+ AND a manifest of L in M
WHEN user U backs up directory L to repository R
AND user U restores their latest generation in repository R into X
THEN L, restored to X, matches manifest M
@@ -220,7 +234,7 @@ setting to a new size, the backup should still work.
AND user U sets configuration node-size to 65536
WHEN user U backs up directory L to repository R
GIVEN 100Kb of new data in directory L
- AND a manifest of directory L in M
+ AND a manifest of L in M
AND user U sets configuration node-size to 4096
WHEN user U backs up directory L to repository R
AND user U restores their latest generation in repository R into X