Package Details: zfs-auto-snapshot-git 1:1.2.1.1.r0.63e4438-1

Git Clone URL: https://aur.archlinux.org/zfs-auto-snapshot-git.git (read-only)
Package Base: zfs-auto-snapshot-git
Description: Implementation of a snapshotting service for ZFS
Upstream URL: None
Licenses: GPL2
Conflicts: zfs-auto-snapshot
Provides: zfs-auto-snapshot
Submitter: chungy
Maintainer: chungy
Last Packager: chungy
Votes: 4
Popularity: 1.421355
First Submitted: 2015-09-03 02:04
Last Updated: 2015-09-03 02:49

Latest Comments

jgottula commented on 2017-09-18 23:12

Oh good, it looks like my comment did post properly this time. Basically the problem is that the zfs-auto-snapshot utility itself, when in --fast mode, uses some fairly hacky substring-sorting trickery to sort the snapshots by date, and that code was written based on the implicit assumption that the last component of the snap name will be the date+time.

Here's my PKGBUILD diff that applies a patch to fix the sorting:
https://gist.github.com/anonymous/b9772d6a1c89601435a0b6e44ac0e0cc

(I've tested it with the 'PREFIX_DATE_LABEL' modification, but didn't check with the original 'PREFIX-LABEL_DATE' naming, so maybe check into that.)

jgottula commented on 2017-09-18 23:01

Hi. I've discovered that the ArchLinux-specific modification in this PKGBUILD (and also in the PKGBUILD for zfs-auto-snapshot) that changes the snapshot name format from 'PREFIX-LABEL_DATE' to 'PREFIX_DATE_LABEL', while nice, has a big problem: it breaks the sorting of old snapshots when the --fast option is used. Which means that the old-snapshot-deletion feature of the utility will end up destroying snaps that aren't actually the oldest ones! I do have a fix patch if you want it; I tried to comment here before but my comment didn't seem to show up.