From 47bb8cbd30ef8308461a1820448f663ad5bb64b8 Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Tue, 7 Mar 2023 01:10:38 +0100 Subject: [PATCH] docs(conf): Add comment per setting (#1) --- pacman-zfs-snapshot.conf | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/pacman-zfs-snapshot.conf b/pacman-zfs-snapshot.conf index 0552ebb..ac529c4 100644 --- a/pacman-zfs-snapshot.conf +++ b/pacman-zfs-snapshot.conf @@ -1,19 +1,27 @@ -do_dry_run='true' +# Set to 'true' to do nothing and just print messages during pacman +# operations. Helpful to get a feel for what these hooks do. This defaults +# to 'true' so if you set this to an empty string or remove or uncomment it +# in this conf file it'll equal 'true'. +do_dry_run='false' -# Pipe-separated list of kernel names. Will be matched against regular -# expression ^this_var_here$. Snapshots taken before a pacman transaction on -# an important package have a separate retention from snapshots for trivial -# packages. Lends itself to keeping kernel updates separate from everything -# else. -important_names='tmux' -# zfs pkgs, systemd? +# Pipe-separated list of package names we consider important. Will be +# matched against regular expression ^(this_var_here)$. Snapshots taken +# before a pacman transaction on an important package have a separate +# retention from snapshots for trivial packages. Lends itself to keeping +# high-risk updates separate from everything else. +important_names='linux|systemd|zfs-(dkms|utils)' +# Number snapshots to keep snaps_trivial_keep='15' snaps_important_keep='5' +# Which suffix to use in snapshot names to identify snapshots before a +# trivial pacman operation and before important pacman operations. snaps_trivial_suffix='trv' snaps_important_suffix='imp' +# Snapshot name will contain list of affected packages trimmed to this many +# max characters. pkgs_list_max_length='30' # Hook will by default snapshot all datasets that have the property @@ -26,10 +34,17 @@ pkgs_list_max_length='30' # jq --raw-output '.[][] | select(.fstype=="zfs") | .source' snap_only_local_datasets='true' +# Which characters do we want to use to separate snapshot name fields snap_field_separator='_' -snap_name_prefix='pac' +# Prefix all our snapshots with this string to keep them separate from +# snapshots done by any other means +snap_name_prefix='pacman' +# We do "$(date +)" to put a timestamp into snapshot names. +# Defaults to "$(date +)" which returns '2023-03-07-0050'. snap_date_format='%F-%H%M' +# Which strings do we want to diffferentiate pacman operations Install, +# Remove, Upgrade snap_op_installation_suffix='inst' snap_op_remove_suffix='rmvl' snap_op_upgrade_suffix='upgr'