You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got sanoid and syncoid set up using the following configuration file, but sanoid appears to be retaining 48 hourly snapshots for the backup datasets, rather than the 36 that the configuration specifies, which it successfully obeys for the source ones.
/etc/sanoid/sanoid.conf
[zroot/ROOT/ubuntu]
use_template = production
recursive = no
[zroot/home]
use_template = production
recursive = no
[bulk]
use_template = production
recursive = no
[bulk/BACKUPS/ubuntu]
use_template = template_syncoid_backups
recursive = no
[bulk/BACKUPS/home]
use_template = template_syncoid_backups
recursive = no
#############################
# templates below this line #
#############################
[template_production]
frequently = 0
hourly = 36
daily = 30
monthly = 3
yearly = 0
autosnap = yes
autoprune = yes
[template_syncoid_backups]
frequently = 0
hourly = 36
daily = 30
monthly = 3
yearly = 0
autosnap = no
autoprune = yes
% sanoid --version
/usr/sbin/sanoid version 2.1.0
(Getopt::Long::GetOptions version 2.52; Perl version 5.34.0)
The text was updated successfully, but these errors were encountered:
Can you try and remove the template_ part from the use_template lines for the backup sections? That shouldn't be there (see your production blocks). So just use use_template = syncoid_backups.
As someone who's spent 25+ years programming strongly typed languages, I seem to have built an instinctive blindness to "identifiers must not be letter-for-letter matches for things to work" and, still remembering an ignored key 'recursive' from 'production' template. message from a while back, I trusted that it'd warn me if it was ignoring those lines for lack of a template being found.
(Hell, if I'd written it, I'd probably have made template name resolution a fatal error on the premise that "better to fail loudly while attention is present than to do the wrong thing quietly after attention has shifted away" is the only right thing to do for something that could silently result in fewer backups being made or more backups being purged than you expect... though I can certainly understand how adding fatal anything at this stage is difficult to do responsibly, even with a major version number bump.)
ssokolow
changed the title
sanoid autoprune on syncoid output preserving too many snapshots
sanoid should warn if it can't find the template requested via use_template
Jul 13, 2024
I've got sanoid and syncoid set up using the following configuration file, but sanoid appears to be retaining 48 hourly snapshots for the backup datasets, rather than the 36 that the configuration specifies, which it successfully obeys for the source ones.
/etc/sanoid/sanoid.conf
The text was updated successfully, but these errors were encountered: