git: 6998950b5195 - main - [NEW PORT] filesystems/diffsnap: ZFS snapshots using write thresholds
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Sep 2026 19:00:12 UTC
The branch main has been updated by michaelo:
URL: https://cgit.FreeBSD.org/ports/commit/?id=6998950b519558ff304c55ab996d9d6b10b0e742
commit 6998950b519558ff304c55ab996d9d6b10b0e742
Author: Joseph Saathoff <josephsaathoff@gmail.com>
AuthorDate: 2026-09-08 16:54:30 +0000
Commit: Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2026-09-08 18:59:51 +0000
[NEW PORT] filesystems/diffsnap: ZFS snapshots using write thresholds
Co-authored-by: Michael Osipov <michaelo@FreeBSD.org>
PR: 296447
---
filesystems/Makefile | 1 +
filesystems/diffsnap/Makefile | 25 +++++++++++++++++++++++++
filesystems/diffsnap/distinfo | 3 +++
filesystems/diffsnap/pkg-descr | 8 ++++++++
filesystems/diffsnap/pkg-message | 10 ++++++++++
5 files changed, 47 insertions(+)
diff --git a/filesystems/Makefile b/filesystems/Makefile
index 3f47dd81333d..f4f98b93ef26 100644
--- a/filesystems/Makefile
+++ b/filesystems/Makefile
@@ -17,6 +17,7 @@
SUBDIR += curlftpfs
SUBDIR += darling-dmg
SUBDIR += davfs2
+ SUBDIR += diffsnap
SUBDIR += dsbmc
SUBDIR += dsbmc-cli
SUBDIR += dsbmd
diff --git a/filesystems/diffsnap/Makefile b/filesystems/diffsnap/Makefile
new file mode 100644
index 000000000000..0b65bcf260ed
--- /dev/null
+++ b/filesystems/diffsnap/Makefile
@@ -0,0 +1,25 @@
+PORTNAME= diffsnap
+DISTVERSION= 1.0
+CATEGORIES= filesystems
+
+MAINTAINER= josephsaathoff@gmail.com
+COMMENT= Create ZFS snapshots based on data write thresholds
+WWW= https://github.com/joe81tx/diffsnap
+
+LICENSE= BSD2CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USE_GITHUB= yes
+GH_ACCOUNT= joe81tx
+
+PLIST_FILES= sbin/diffsnap \
+ "@sample etc/newsyslog.conf.d/diffsnap.conf.sample" \
+ "@sample etc/diffsnap.conf.sample" \
+ "@sample etc/diffsnap.cron.sample etc/cron.d/diffsnap"
+
+MAKE_ARGS+= BUILD_SHA=portbld
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/diffsnap
+
+.include <bsd.port.mk>
diff --git a/filesystems/diffsnap/distinfo b/filesystems/diffsnap/distinfo
new file mode 100644
index 000000000000..2b98da5f7d77
--- /dev/null
+++ b/filesystems/diffsnap/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1788885923
+SHA256 (joe81tx-diffsnap-1.0_GH0.tar.gz) = ae5c06380167831feb0d454b48fa05a3d60c7bb5f3a0a4f615881ba26c54728b
+SIZE (joe81tx-diffsnap-1.0_GH0.tar.gz) = 85744
diff --git a/filesystems/diffsnap/pkg-descr b/filesystems/diffsnap/pkg-descr
new file mode 100644
index 000000000000..62f5a0b381d8
--- /dev/null
+++ b/filesystems/diffsnap/pkg-descr
@@ -0,0 +1,8 @@
+diffsnap is a lightweight, on-demand snapshot scheduler for OpenZFS
+where snapshots are generated only when a configured change threshold
+is met. It supports per-dataset scheduling intervals, retention
+counts, recursive snapshots, and minimum byte thresholds.
+
+The utility is completely daemonless, uses native zfs
+commands, handles locking to prevent overlapping runs, and safely
+prunes old snapshots matching only its own prefix context.
diff --git a/filesystems/diffsnap/pkg-message b/filesystems/diffsnap/pkg-message
new file mode 100644
index 000000000000..02cfd50d28b4
--- /dev/null
+++ b/filesystems/diffsnap/pkg-message
@@ -0,0 +1,10 @@
+[
+{ type: install
+ message: <<EOM
+Configure ${PREFIX}/etc/diffsnap.conf
+Uncomment ${PREFIX}/etc/cron.d/diffsnap to enable the cron schedule
+The default is every minute which can be changed by editing the file
+More details at https://github.com/joe81tx/diffsnap
+EOM
+}
+]