From ad139b81f26c6e7bff5b6fa9e5e796d18cfcfca7 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Thu, 20 Oct 2022 16:17:37 +0200 Subject: [PATCH] btrbk --- host_files/btrbk/suricata/btrbk.conf | 9 +++++++++ roles/cryptoraid/tasks/alpine.yml | 1 + roles/cryptoraid/tasks/main.yml | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 host_files/btrbk/suricata/btrbk.conf diff --git a/host_files/btrbk/suricata/btrbk.conf b/host_files/btrbk/suricata/btrbk.conf new file mode 100644 index 0000000..64c23c4 --- /dev/null +++ b/host_files/btrbk/suricata/btrbk.conf @@ -0,0 +1,9 @@ +timestamp_format long +snapshot_preserve_min 18h +snapshot_preserve 48h + +transaction_log /var/log/btrbk.log + +volume /mnt/btr_pool + snapshot_dir btrbk_snapshots + subvolume home diff --git a/roles/cryptoraid/tasks/alpine.yml b/roles/cryptoraid/tasks/alpine.yml index 1687468..fe58ece 100644 --- a/roles/cryptoraid/tasks/alpine.yml +++ b/roles/cryptoraid/tasks/alpine.yml @@ -3,6 +3,7 @@ apk: name: - btrbk + - coreutils # needed by btrbk - btrfs-progs - cryptsetup - gnupg diff --git a/roles/cryptoraid/tasks/main.yml b/roles/cryptoraid/tasks/main.yml index ec11423..d8aaef6 100644 --- a/roles/cryptoraid/tasks/main.yml +++ b/roles/cryptoraid/tasks/main.yml @@ -13,3 +13,8 @@ - "btr_balance.sh" - "btr_scrub.sh" - "fs_trim.sh" + +- name: copy btrbk config + copy: + src: "host_files/btrbk/{{ ansible_hostname }}/btrbk.conf" + dest: /etc/btrbk/btrbk.conf