aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorohauer <ohauer@FreeBSD.org>2011-01-10 05:01:29 +0800
committerohauer <ohauer@FreeBSD.org>2011-01-10 05:01:29 +0800
commitab0d29663da47432b544621ee5821e8c66775b8e (patch)
tree4fabd679724781f8c0214e8518cb3a0c230a5bf0 /sysutils
parent10565d00ba0310a6004d5cf5dbb39e737e5143c4 (diff)
downloadfreebsd-ports-gnome-ab0d29663da47432b544621ee5821e8c66775b8e.tar.gz
freebsd-ports-gnome-ab0d29663da47432b544621ee5821e8c66775b8e.tar.zst
freebsd-ports-gnome-ab0d29663da47432b544621ee5821e8c66775b8e.zip
Scripts that uses the the periodic system to create and manage zfs
snapshots. Easily configured via /etc/periodic.conf WWW: http://www.neces.com/blog/technology/integrating-freebsd-zfs-and-periodic-snapshots-and-scrubs PR: ports/152065 Submitted by: Peter Ankerstal <peter at pean.org>
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/zfs-periodic/Makefile51
-rw-r--r--sysutils/zfs-periodic/distinfo2
-rw-r--r--sysutils/zfs-periodic/pkg-descr4
-rw-r--r--sysutils/zfs-periodic/pkg-message23
5 files changed, 81 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 2a93ff774919..44c3ae9e3001 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1013,6 +1013,7 @@
SUBDIR += yawho
SUBDIR += zeroer
SUBDIR += zetaback
+ SUBDIR += zfs-periodic
SUBDIR += zfs-replicate
SUBDIR += zfs-snapshot-clean
SUBDIR += zfs-snapshot-mgmt
diff --git a/sysutils/zfs-periodic/Makefile b/sysutils/zfs-periodic/Makefile
new file mode 100644
index 000000000000..065eee05a864
--- /dev/null
+++ b/sysutils/zfs-periodic/Makefile
@@ -0,0 +1,51 @@
+# New ports collection makefile for: zfs-periodic
+# Date created: 8 November 2010
+# Whom: Peter Ankerstal <peter@pean.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= zfs-periodic
+PORTVERSION= 1.0
+CATEGORIES= sysutils
+MASTER_SITES= http://www.pean.org/zfs-periodic/
+
+MAINTAINER= peter@pean.org
+COMMENT= Simple way of maitaining zfs snapshots using the periodic system
+
+NO_BUILD= yes
+
+PERIODIC_DIRS= etc/periodic/hourly etc/periodic/daily \
+ etc/periodic/weekly etc/periodic/monthly \
+ etc/periodic
+
+PERIODIC_FILES= etc/periodic/hourly/000.zfs-snapshot \
+ etc/periodic/daily/000.zfs-snapshot \
+ etc/periodic/weekly/000.zfs-snapshot \
+ etc/periodic/monthly/000.zfs-snapshot \
+ etc/periodic/monthly/998.zfs-scrub
+
+PLIST_FILES= ${PERIODIC_FILES} bin/zfs-snapshot
+PLIST_DIRSTRY= ${PERIODIC_DIRS}
+
+post-patch:
+.for _file in ${PERIODIC_FILES}
+ @${REINPLACE_CMD} -e "s|/etc/periodic/zfs-snapshot|${PREFIX}/bin/zfs-snapshot|" \
+ ${WRKSRC}/${_file}
+.endfor
+
+do-install:
+ @${INSTALL_SCRIPT} ${WRKSRC}/etc/periodic/zfs-snapshot ${PREFIX}/bin
+
+.for _dir in ${PERIODIC_DIRS}
+ @${MKDIR} ${PREFIX}/${_dir}
+.endfor
+
+.for _file in ${PERIODIC_FILES}
+ @${INSTALL_SCRIPT} ${WRKSRC}/${_file} ${PREFIX}/${_file}
+.endfor
+
+post-install:
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/sysutils/zfs-periodic/distinfo b/sysutils/zfs-periodic/distinfo
new file mode 100644
index 000000000000..5632ca3a8cee
--- /dev/null
+++ b/sysutils/zfs-periodic/distinfo
@@ -0,0 +1,2 @@
+SHA256 (zfs-periodic-1.0.tar.gz) = 3a15951d9f4c1f9b1bdf6bf5f53d48967c1681a13d9e1a16a10314160f563f0c
+SIZE (zfs-periodic-1.0.tar.gz) = 2506
diff --git a/sysutils/zfs-periodic/pkg-descr b/sysutils/zfs-periodic/pkg-descr
new file mode 100644
index 000000000000..5bac9f1d8a6f
--- /dev/null
+++ b/sysutils/zfs-periodic/pkg-descr
@@ -0,0 +1,4 @@
+Scripts that uses the the periodic system to create and manage zfs
+snapshots. Easily configured via /etc/periodic.conf
+
+WWW: http://www.neces.com/blog/technology/integrating-freebsd-zfs-and-periodic-snapshots-and-scrubs
diff --git a/sysutils/zfs-periodic/pkg-message b/sysutils/zfs-periodic/pkg-message
new file mode 100644
index 000000000000..eae69a790e77
--- /dev/null
+++ b/sysutils/zfs-periodic/pkg-message
@@ -0,0 +1,23 @@
+
+ In order to enable periodic snapshots you need
+ to add these lines to your /etc/periodic.conf
+
+ hourly_output="root"
+ hourly_show_success="NO"
+ hourly_show_info="YES"
+ hourly_show_badconfig="NO"
+ hourly_zfs_snapshot_enable="YES"
+ hourly_zfs_snapshot_pools="tank"
+ hourly_zfs_snapshot_keep=6
+ daily_zfs_snapshot_enable="YES"
+ daily_zfs_snapshot_pools="tank"
+ daily_zfs_snapshot_keep=7
+ weekly_zfs_snapshot_enable="YES"
+ weekly_zfs_snapshot_pools="tank"
+ weekly_zfs_snapshot_keep=5
+ monthly_zfs_snapshot_enable="YES"
+ monthly_zfs_scrub_enable="YES"
+ monthly_zfs_scrub_pools="tank"
+ monthly_zfs_snapshot_pools="tank"
+ monthly_zfs_snapshot_keep=2'
+