summary refs log tree commit diff
diff options
context:
space:
mode:
authorRail Aliiev <rail@mozilla.com>2020-03-23 16:13:06 -0400
committerRail Aliiev <rail@mozilla.com>2020-03-23 21:29:49 -0400
commitba7e3c6cbafcf4c40db0580ac36996d5e65d6397 (patch)
tree6115172fd0a2c60ce600ff7b5f3723ddbbf9a8ee
parent0c085950d76762a01acefc714b6d627c65df94c4 (diff)
downloadnixpkgs-ba7e3c6cbafcf4c40db0580ac36996d5e65d6397.tar
nixpkgs-ba7e3c6cbafcf4c40db0580ac36996d5e65d6397.tar.gz
nixpkgs-ba7e3c6cbafcf4c40db0580ac36996d5e65d6397.tar.bz2
nixpkgs-ba7e3c6cbafcf4c40db0580ac36996d5e65d6397.tar.lz
nixpkgs-ba7e3c6cbafcf4c40db0580ac36996d5e65d6397.tar.xz
nixpkgs-ba7e3c6cbafcf4c40db0580ac36996d5e65d6397.tar.zst
nixpkgs-ba7e3c6cbafcf4c40db0580ac36996d5e65d6397.zip
Add new znapzend features to modules
-rw-r--r--nixos/modules/services/backup/znapzend.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixos/modules/services/backup/znapzend.nix b/nixos/modules/services/backup/znapzend.nix
index 203631a577f..98cd647f61a 100644
--- a/nixos/modules/services/backup/znapzend.nix
+++ b/nixos/modules/services/backup/znapzend.nix
@@ -372,6 +372,41 @@ in
         and <citerefentry><refentrytitle>zfs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
         for more info.
       '';
+      features.sendRaw = mkEnableOption ''
+        sendRaw feature which adds the options <literal>-w</literal> to the
+        <command>zfs send</command> command. For encrypted source datasets this
+        instructs zfs not to decrypt before sending which results in a remote
+        backup that can't be read without the encryption key/passphrase, useful
+        when the remote isn't fully trusted or not physically secure. This
+        option must be used consistently, raw incrementals cannot be based on
+        non-raw snapshots and vice versa.
+      '';
+      features.skipIntermediates = mkEnableOption ''
+        Enable the skipIntermediates feature to send a single increment
+        between latest common snapshot and the newly made one. It may skip
+        several source snaps if the destination was offline for some time, and
+        it should skip snapshots not managed by znapzend. Normally for online
+        destinations, the new snapshot is sent as soon as it is created on the
+        source, so there are no automatic increments to skip.
+      '';
+      features.lowmemRecurse = mkEnableOption ''
+        use lowmemRecurse on systems where you have too many datasets, so a
+        recursive listing of attributes to find backup plans exhausts the
+        memory available to <command>znapzend</command>: instead, go the slower
+        way to first list all impacted dataset names, and then query their
+        configs one by one.
+      '';
+      features.zfsGetType = mkEnableOption ''
+        use zfsGetType if your <command>zfs get</command> supports a
+        <literal>-t</literal> argument for filtering by dataset type at all AND
+        lists properties for snapshots by default when recursing, so that there
+        is too much data to process while searching for backup plans.
+        If these two conditions apply to your system, the time needed for a
+        <literal>--recursive</literal> search for backup plans can literally
+        differ by hundreds of times (depending on the amount of snapshots in
+        that dataset tree... and a decent backup plan will ensure you have a lot
+        of those), so you would benefit from requesting this feature.
+      '';
     };
   };