summaryrefslogtreecommitdiff
path: root/yarns/9000-implements.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-01-12 13:36:45 +0000
committerLars Wirzenius <liw@liw.fi>2014-01-12 13:36:45 +0000
commitf9e7a6522af273346d77debce154dedd5e14c5a8 (patch)
tree732f8f1602c79633f4b7388716f5b4be73e50115 /yarns/9000-implements.yarn
parent699670b2d671a7e0379eb6540ec02b67efdb634f (diff)
downloadobnam-f9e7a6522af273346d77debce154dedd5e14c5a8.tar.gz
Basic encrypted backup/restore test
This sets up a whole lot of infrastructure, too.
Diffstat (limited to 'yarns/9000-implements.yarn')
-rw-r--r--yarns/9000-implements.yarn19
1 files changed, 19 insertions, 0 deletions
diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn
index 1de44c15..144b7245 100644
--- a/yarns/9000-implements.yarn
+++ b/yarns/9000-implements.yarn
@@ -82,6 +82,25 @@ We may also need to check two manifests against each other.
IMPLEMENTS THEN manifests (\S+) and (\S+) match
diff -u "$DATADIR/$MATCH_1" "$DATADIR/$MATCH_2"
+Obnam configuration management
+------------------------------
+
+In some scenarios, it is easier to maintain a configuration file than
+to pass in all the options to `run_obnam` every time. This section
+contains steps to do that.
+
+Scenarios involving encryption need to specify the encryption key to
+use. We store that.
+
+ IMPLEMENTS GIVEN user (\S+) uses encryption key "(.*)" from (\S+)
+ if [ ! -e "$DATADIR/$MATCH_1.gnupg" ]
+ then
+ mkdir "$DATADIR/$MATCH_1.gnupg"
+ cp -a "$SRCDIR/$MATCH_3/." "$DATADIR/$MATCH_1.gnupg/."
+ add_to_env "$MATCH_1" GNUPGHOME "$DATADIR/$MATCH_1.gnupg"
+ fi
+ add_to_config "$DATADIR/$MATCH_1.conf" encrypt-with "$MATCH_2"
+
Backing up
----------