diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-01-25 18:44:57 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-01-25 18:44:57 +0000 |
commit | 99183871095a7cd0b1b588ec27522d0b27aa1723 (patch) | |
tree | 6214a6ac214891bc7a5123c04d2c5aa8b9f9eb65 /yarns | |
parent | 45cfbb602d1a5d56e6d701df4786c41c1398586a (diff) | |
download | obnam-99183871095a7cd0b1b588ec27522d0b27aa1723.tar.gz |
Convert two-roots to a yarn
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/0030-basics.yarn | 16 | ||||
-rw-r--r-- | yarns/9000-implements.yarn | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn index 4a89d64e..a0294484 100644 --- a/yarns/0030-basics.yarn +++ b/yarns/0030-basics.yarn @@ -86,6 +86,22 @@ duplication. AND user U restores their latest generation in repository R into X THEN L, restored to X, matches manifest M +Backup to roots at once +----------------------- + +Often it's useful to backup more than one location at once. We'll +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 + 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 + THEN L2, restored to X, matches manifest M2 + Pretend backing up: the `--pretend` setting ------------------------------------------- diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn index 5ac48997..1d005d77 100644 --- a/yarns/9000-implements.yarn +++ b/yarns/9000-implements.yarn @@ -166,6 +166,12 @@ addition to backing up, this makes a manifest of the data. IMPLEMENTS WHEN user (\S+) backs up directory (\S+) to repository (\S+) run_obnam "$MATCH_1" backup -r "$DATADIR/$MATCH_3" "$DATADIR/$MATCH_2" +We may also need to backup two directories at once. + + IMPLEMENTS WHEN user (\S+) backs up directories (\S+) and (\S+) to repository (\S+) + run_obnam "$MATCH_1" backup -r "$DATADIR/$MATCH_4" \ + "$DATADIR/$MATCH_2" "$DATADIR/$MATCH_3" + We can also just pretend to make a backup. IMPLEMENTS WHEN user (\S+) pretends to back up directory (\S+) to repository (\S+) |