@xuanruiqi: That's good. Still, zfs-auto-snapshot-git is the first on the https://wiki.archlinux.org/index.php/ZFS#Automatic_snapshots list. You can pin your comment here, if you want. And I am very surprised that sanoid is not mentioned in the Wiki.
Search Criteria
Package Details: zfs-auto-snapshot-git 1.2.4.r31.92db087-2
Package Actions
Git Clone URL: | https://aur.archlinux.org/zfs-auto-snapshot-git.git (read-only, click to copy) |
---|---|
Package Base: | zfs-auto-snapshot-git |
Description: | Implementation of a snapshotting service for ZFS |
Upstream URL: | https://github.com/zfsonlinux/zfs-auto-snapshot |
Licenses: | GPL2 |
Conflicts: | zfs-auto-snapshot |
Provides: | zfs-auto-snapshot |
Submitter: | chungy |
Maintainer: | xuanruiqi |
Last Packager: | willemw |
Votes: | 11 |
Popularity: | 0.000103 |
First Submitted: | 2015-09-03 02:04 (UTC) |
Last Updated: | 2020-06-13 07:13 (UTC) |
Dependencies (3)
- systemd (systemd-chromiumosAUR, systemd-selinuxAUR, sysupdated-systemd-gitAUR, systemd-gitAUR, systemd-fmlAUR)
- zfs (zfs-linux-gitAUR, zfs-linux-hardenedAUR, zfs-linux-zenAUR, zfs-dkmsAUR, zfs-dkms-gitAUR, zfs-linuxAUR, zfs-linux-rtAUR, zfs-dkms-staging-compat-gitAUR, zfs-linux-ltsAUR, zfs-dkms-staging-gitAUR)
- git (git-gitAUR, git-glAUR) (make)
Required by (0)
Sources (2)
willemw commented on 2021-02-21 22:01 (UTC)
xuanruiqi commented on 2021-02-21 21:54 (UTC)
@willemw: I actually added the section about zrepl on the ZFS page in the Arch Wiki, since that's what I'm using.
willemw commented on 2021-02-21 21:52 (UTC)
@xuanruiqi: Maybe discuss or edit this on the main or discussion page of the ZFS Wiki?
Have switched to sanoid myself.
xuanruiqi commented on 2021-02-21 21:36 (UTC) (edited on 2021-02-21 22:10 (UTC) by xuanruiqi)
In 2021, you probably don't want to use this. zrepl and sanoid are much better choices.
codyps commented on 2020-06-13 23:42 (UTC)
the prefix_label_order
patch was intended to make it easier to visually scan the snapshots when they are listed (as the datestamps are all aligned). And it also makes sorting simpler.
It is the case that it's incompatible with samba's vfs shadow copy2 "snapprefix" option. When the prefix_label_order change was added, snapprefix was not an option, and folks supported shadow copy with zfs-auto-snapshot by having the "daily"/"hourly"/etc label pretend to be seconds. See https://github.com/zfsonlinux/zfs-auto-snapshot/issues/10 for some solutions folks used.
It is somewhat unfortunate that zfs-auto-snapshot ever used the "daily"/"hourly"/etc labels on snapshots, as it's very feasible (via a bucketing algorithm) to avoid explicit tagging entirely. This is done, for example, in zrepl and snapper (no zfs support mainline in this one).
xuanruiqi commented on 2020-06-13 15:29 (UTC) (edited on 2020-06-13 15:30 (UTC) by xuanruiqi)
I've adopted this package because I recently moved from Btrfs to ZFS. I don't understand the point of the patch either. If anyone has any rationale for the patch, please enlighten me.
willemw commented on 2020-06-13 07:44 (UTC)
Disowned. Not using zfs-auto-snapshot anymore.
fow0ryl commented on 2020-06-12 21:52 (UTC)
What is the real reason for the prefix_label_order.patch?
With this patch a snapshot name is like this: zpool@znap_2020-06-08-2200_daily Without the patch it should be like: zpool@znap_daily_2020-06-08-2200
But using the patched naming scheme breaks support for windows shadow copy in smb! So why there is the patch?
jonathon commented on 2019-04-13 10:27 (UTC) (edited on 2019-04-28 16:57 (UTC) by jonathon)
prefix_label_order.patch
fails to apply after b0a5909. "Fixed" patch is below though it will need to be checked against the upstream changes to SNAPNAME
and SNAPGLOB
.
aurweb changes tabs to spaces (and trims trailing whitespace) so this won't work copy&paste. :( An actually-working version is here (for a week, anyway): https://bpaste.net/show/935b2a7beeba
diff --git a/src/zfs-auto-snapshot.sh b/src/zfs-auto-snapshot.sh
index 5ef5bae..75ba11d 100755
--- a/src/zfs-auto-snapshot.sh
+++ b/src/zfs-auto-snapshot.sh
@@ -398,9 +398,7 @@ if [ -n "$opt_fast_zfs_list" ]
then
SNAPSHOTS_OLD=$(env LC_ALL=C zfs list -H -t snapshot -o name -s name | \
grep $opt_prefix | \
- awk '{ print substr( $0, length($0) - 14, length($0) ) " " $0}' | \
- sort -r -k1,1 -k2,2 | \
- awk '{ print substr( $0, 17, length($0) )}') \
+ sort -t'@' -k2r,2 -k1,1) \
|| { print_log error "zfs list $?: $SNAPSHOTS_OLD"; exit 137; }
else
SNAPSHOTS_OLD=$(env LC_ALL=C zfs list -H -t snapshot -S creation -o name) \
@@ -569,10 +569,10 @@ SNAPPROP="-o com.sun:auto-snapshot-desc='$opt_event'"
DATE=$(date --utc +%F-%H%M)
# The snapshot name after the @ symbol.
-SNAPNAME="${opt_prefix:+$opt_prefix$opt_sep}${opt_label:+$opt_label}-$DATE"
+SNAPNAME="${opt_prefix}_$DATE${opt_label:+$opt_sep$opt_label}"
# The expression for matching old snapshots. -YYYY-MM-DD-HHMM
-SNAPGLOB="${opt_prefix:+$opt_prefix$opt_sep}${opt_label:+$opt_label}-???????????????"
+SNAPGLOB="${opt_prefix}????????????????${opt_label:+?$opt_label}"
if [ -n "$opt_do_snapshots" ]
then
Pinned Comments
xuanruiqi commented on 2021-02-21 21:36 (UTC) (edited on 2021-02-21 22:10 (UTC) by xuanruiqi)
In 2021, you probably don't want to use this. zrepl and sanoid are much better choices.