From 83a38cb39069618bc35916750294c460a267fc97 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Tue, 13 Jun 2017 16:59:21 +0200 Subject: [PATCH] documentation: FAQ.md: add section "How can I setup a debian pre-install-hook?" --- doc/FAQ.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doc/FAQ.md b/doc/FAQ.md index ffd60cf..8f84b6b 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -22,6 +22,19 @@ tags in your configuration and dump only the volumes of this group: [btrbk(1)]: http://digint.ch/btrbk/doc/btrbk.html +How can I setup a debian pre-install hook? +------------------------------------------ + +Create a file `/etc/apt/apt.conf.d/70btrbk`, e.g.: + + // create a btrfs snapshot before (un)installing packages + Dpkg::Pre-Invoke {"/usr/sbin/btrbk run /mnt/btr_pool/rootfs";}; + +In order to make sure that the snapshots are always generated and +nothing is deleted, add the btrbk command line options `--preserve +--override=snapshot_create=always`. + + Why is it not possible to backup '/' (btrfs root) ? ---------------------------------------------------