aboutsummaryrefslogtreecommitdiff
path: root/sysutils/zfs-periodic
diff options
context:
space:
mode:
authorOlli Hauer <ohauer@FreeBSD.org>2011-01-09 21:01:29 +0000
committerOlli Hauer <ohauer@FreeBSD.org>2011-01-09 21:01:29 +0000
commit0265fdf6f6ebdcbf29597ab38385a6faa17df1ac (patch)
tree3b93fb61d745def4ccfd3f6f38ce9056a6ce6927 /sysutils/zfs-periodic
parentef206c5e15e3784eb0a9868115147735a99d3211 (diff)
downloadports-0265fdf6f6ebdcbf29597ab38385a6faa17df1ac.tar.gz
ports-0265fdf6f6ebdcbf29597ab38385a6faa17df1ac.zip
Notes
Diffstat (limited to 'sysutils/zfs-periodic')
-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
4 files changed, 80 insertions, 0 deletions
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'
+