documentation: FAQ.md: add section "How can I setup a debian pre-install-hook?"

pull/164/head
Axel Burri 2017-06-13 16:59:21 +02:00
parent c0c546eb4e
commit 83a38cb390
1 changed files with 13 additions and 0 deletions

View File

@ -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) ?
---------------------------------------------------