Update config from a copy of the default example to one specific to local partition scheme.

This commit is contained in:
cyteen 2026-02-24 01:15:36 +00:00
parent ac4da8c7f3
commit 5019dfbd55
1 changed files with 20 additions and 16 deletions

View File

@ -1,4 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env bash
echo "Available in debian, install with 020_sanoid.sh"
exit 1
#------------------------------------------------------------------------------
apt install -y libconfig-inifiles-perl git apt install -y libconfig-inifiles-perl git
cd /opt cd /opt
@ -17,17 +23,17 @@ cp /opt/sanoid/sanoid.defaults.conf /etc/sanoid/sanoid.defaults.conf
# # # # # #
# # you have been warned. # # # you have been warned. #
# ################################################################################### # ###################################################################################
# #
# [template_default] # [template_default]
# #
# # these settings don't make sense in a template, but we use the defaults file # # these settings don't make sense in a template, but we use the defaults file
# # as our list of allowable settings also, so they need to be present here even if # # as our list of allowable settings also, so they need to be present here even if
# # unset. # # unset.
# path = # path =
# recursive = # recursive =
# use_template = # use_template =
# process_children_only = # process_children_only =
# #
# # If any snapshot type is set to 0, we will not take snapshots for it - and will immediately # # If any snapshot type is set to 0, we will not take snapshots for it - and will immediately
# # prune any of those type snapshots already present. # # prune any of those type snapshots already present.
# # # #
@ -39,11 +45,11 @@ cp /opt/sanoid/sanoid.defaults.conf /etc/sanoid/sanoid.defaults.conf
# monthly = 6 # monthly = 6
# yearly = 0 # yearly = 0
# min_percent_free = 10 # min_percent_free = 10
# #
# # We will automatically take snapshots if autosnap is on, at the desired times configured # # We will automatically take snapshots if autosnap is on, at the desired times configured
# # below (or immediately, if we don't have one since the last preferred time for that type). # # below (or immediately, if we don't have one since the last preferred time for that type).
# # # #
# # Note that we will not take snapshots for a given type if that type is set to 0 above, # # Note that we will not take snapshots for a given type if that type is set to 0 above,
# # regardless of the autosnap setting - for example, if yearly=0 we will not take yearlies # # regardless of the autosnap setting - for example, if yearly=0 we will not take yearlies
# # even if we've defined a preferred time for yearlies and autosnap is on. # # even if we've defined a preferred time for yearlies and autosnap is on.
# autosnap = 1; # autosnap = 1;
@ -61,7 +67,7 @@ cp /opt/sanoid/sanoid.defaults.conf /etc/sanoid/sanoid.defaults.conf
# yearly_mday = 1; # yearly_mday = 1;
# yearly_hour = 0; # yearly_hour = 0;
# yearly_min = 0; # yearly_min = 0;
# #
# # monitoring plugin - define warn / crit levels for each snapshot type by age, in units of one period down # # monitoring plugin - define warn / crit levels for each snapshot type by age, in units of one period down
# # example hourly_warn = 90 means issue WARNING if most recent hourly snapshot is not less than 90 minutes old, # # example hourly_warn = 90 means issue WARNING if most recent hourly snapshot is not less than 90 minutes old,
# # daily_crit = 36 means issue CRITICAL if most recent daily snapshot is not less than 36 hours old, # # daily_crit = 36 means issue CRITICAL if most recent daily snapshot is not less than 36 hours old,
@ -75,7 +81,7 @@ cp /opt/sanoid/sanoid.defaults.conf /etc/sanoid/sanoid.defaults.conf
# monitor_dont_warn = no # monitor_dont_warn = no
# monitor_dont_crit = no # monitor_dont_crit = no
# hourly_warn = 90 # hourly_warn = 90
# hourly_crit = 360 # hourly_crit = 360
# daily_warn = 28 # daily_warn = 28
# daily_crit = 32 # daily_crit = 32
# monthly_warn = 32 # monthly_warn = 32
@ -87,17 +93,17 @@ cp /opt/sanoid/sanoid.defaults.conf /etc/sanoid/sanoid.defaults.conf
# #
# * * * * * /usr/local/bin/sanoid --cron # * * * * * /usr/local/bin/sanoid --cron
# #
# Only crontab entry you'll ever need. (You're of course perfectly welcome to do something like # Only crontab entry you'll ever need. (You're of course perfectly welcome to do something like
# #
# 0 * * * * /usr/local/bin/sanoid --cron # 0 * * * * /usr/local/bin/sanoid --cron
# #
# instead if you want to limit number of executions possible.) different number of snapshots per volume # instead if you want to limit number of executions possible.) different number of snapshots per volume
# #
# Super easy. You can use templates, write your own templates, or override individual settings within a # Super easy. You can use templates, write your own templates, or override individual settings within a
# template. # template.
# #
# Some example usage, including recursive application (will apply to datasets that are children of the # Some example usage, including recursive application (will apply to datasets that are children of the
# dataset being configured) and non-recursive, a custom template, and overriding individual settings in # dataset being configured) and non-recursive, a custom template, and overriding individual settings in
# a template: # a template:
#/etc/sanoid/sanoid.conf: #/etc/sanoid/sanoid.conf:
@ -137,7 +143,7 @@ cp /opt/sanoid/sanoid.defaults.conf /etc/sanoid/sanoid.defaults.conf
# autosnap = yes # autosnap = yes
# autoprune = yes # autoprune = yes
cat > /etc/sanoid/sanoid.conf << 'EOF' cat >/etc/sanoid/sanoid.conf <<'EOF'
###################################### ######################################
# This is a sample sanoid.conf file. # # This is a sample sanoid.conf file. #
# It should go in /etc/sanoid. # # It should go in /etc/sanoid. #
@ -207,5 +213,3 @@ cat > /etc/sanoid/sanoid.conf << 'EOF'
daily_warn = 48 daily_warn = 48
daily_crit = 60 daily_crit = 60
EOF EOF