diff options
author | Tim Bishop <tdb@FreeBSD.org> | 2011-01-13 11:53:18 +0000 |
---|---|---|
committer | Tim Bishop <tdb@FreeBSD.org> | 2011-01-13 11:53:18 +0000 |
commit | d4d89e4f82d31ed92dc04c4f641062ce5c55887e (patch) | |
tree | e75e0ddd7be223a10b39bc627df6f81854f84875 /sysutils | |
parent | - Update to 0.4.2. (diff) |
- Update to 1.9.1
PR: ports/153934
Submitted by: Aldis Berjoza <aldis@bsdroot.lv> (maintainer)
Feature safe: yes
Notes
Notes:
svn path=/head/; revision=267742
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/zfsnap/Makefile | 29 | ||||
-rw-r--r-- | sysutils/zfsnap/distinfo | 4 | ||||
-rw-r--r-- | sysutils/zfsnap/pkg-message | 50 | ||||
-rw-r--r-- | sysutils/zfsnap/pkg-plist | 15 |
4 files changed, 91 insertions, 7 deletions
diff --git a/sysutils/zfsnap/Makefile b/sysutils/zfsnap/Makefile index 9faf5402c63d..ec3177796632 100644 --- a/sysutils/zfsnap/Makefile +++ b/sysutils/zfsnap/Makefile @@ -6,7 +6,7 @@ # PORTNAME= zfsnap -PORTVERSION= 1.8.2 +PORTVERSION= 1.9.1 CATEGORIES= sysutils MASTER_SITES= http://files.bsdroot.lv/my/FreeBSD/distfiles/ DISTNAME= zfSnap-${PORTVERSION} @@ -14,13 +14,32 @@ DISTNAME= zfSnap-${PORTVERSION} MAINTAINER= aldis@bsdroot.lv COMMENT= Simple sh script to make zfs rolling snaphosts with cron -PLIST_FILES= sbin/zfSnap - NO_BUILD= yes WRKSRC= ${WRKDIR}/zfSnap-${REV} -REV= fe4a95a6b271 +REV= 97120372a8b2 + +PERIODICDIR?= ${PREFIX}/etc/periodic +PLIST_SUB+= PERIODICDIR="${PERIODICDIR:S,^${PREFIX}/,,}" + +do-patch: +.for period in hourly daily weekly monthly reboot + @${SED} -e "s/xPERIODICx/${period}/g" -e "s#xPREFIXx#${PREFIX}/sbin#g" ${WRKSRC}/xPERIODICx_zfSnap.sh > ${WRKSRC}/${period}_zfSnap.sh +.endfor +.for period in daily weekly monthly + @${SED} -e "s/xPERIODICx/${period}/g" -e "s#xPREFIXx#${PREFIX}/sbin#g" ${WRKSRC}/xPERIODICx_zfSnap_delete.sh > ${WRKSRC}/${period}_zfSnap_delete.sh +.endfor do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/zfSnap.sh ${PREFIX}/sbin/zfSnap + @${INSTALL_SCRIPT} ${WRKSRC}/zfSnap.sh ${PREFIX}/sbin/zfSnap +.for period in hourly daily weekly monthly reboot + @${MKDIR} ${PERIODICDIR}/${period} + @${INSTALL_SCRIPT} ${WRKSRC}/${period}_zfSnap.sh ${PERIODICDIR}/${period}/402.zfSnap +.endfor +.for period in daily weekly monthly + @${INSTALL_SCRIPT} ${WRKSRC}/${period}_zfSnap_delete.sh ${PERIODICDIR}/${period}/403.zfSnap_delete +.endfor + +post-install: + @${CAT} ${PKGMESSAGE} .include <bsd.port.mk> diff --git a/sysutils/zfsnap/distinfo b/sysutils/zfsnap/distinfo index 71ab57b78ea9..a5ed545d1def 100644 --- a/sysutils/zfsnap/distinfo +++ b/sysutils/zfsnap/distinfo @@ -1,2 +1,2 @@ -SHA256 (zfSnap-1.8.2.tar.gz) = d67398b4d24f1e48f7121e774a3aa3812dfd08456a28a4926946df87c5388672 -SIZE (zfSnap-1.8.2.tar.gz) = 3843 +SHA256 (zfSnap-1.9.1.tar.gz) = aaa92147d4c6e1b0f2e76edab8822a96ed041ae41869d896a819f170d7c4476b +SIZE (zfSnap-1.9.1.tar.gz) = 4705 diff --git a/sysutils/zfsnap/pkg-message b/sysutils/zfsnap/pkg-message new file mode 100644 index 000000000000..04ea6456afc7 --- /dev/null +++ b/sysutils/zfsnap/pkg-message @@ -0,0 +1,50 @@ + + To run zfSnap periodically you can add these options to your + /etc/periodic.conf + + xPERIODICx_zfsnap_enable - Enable xPERIODICx snapshots + (values: YES | NO) + xPERIODICx_zfsnap_fs - Space separated zfs filesystems + to create non-recursive snapshots + xPERIODICx_zfsnap_recursive_fs - Space separated zfs filesystems + to create recursive snapshots + xPERIODICx_zfsnap_ttl - Set Time To Live + xPERIODICx_zfsnap_verbose - Verbose output (values: YES | NO) + xPERIODICx_zfsnap_flags - zfSnap generic flags + (except -v and -d) + xPERIODICx_zfsnap_enable_prefix - Create snapshots with prefix + (Default = YES) + xPERIODICx_zfsnap_prefix - Set prefix to use for new snapshots + (Default = "xPERIODICx-") + (where xPERIODICx is any of hourly, daily, weekly, monthly, reboot) + + xPERIODICx_zfsnap_delete_enable - Delete old snapshots periodicaly + (values: YES | NO) + xPERIODICx_zfsnap_delete_flags - zfSnap generic flags + (except -v and -d) + xPERIODICx_zfsnap_delete_verbose - Verbose output (values: YES | NO) + xPERIODICx_zfsnap_delete_prefixes - Space separated list of prefixes + of old zfSnap snapshots to delete + 'hourly-', 'daily-', 'weekly-', + 'monthly-' and 'reboot' prefixes + are hardcoded + (where xPERIODICx is any of daily, weekly, monthly) + + + Add these lines to your /etc/crontab + 4 * * * * root periodic hourly + @reboot root periodic reboot + + NOTE: it is not recommended to delete zfSnap snapshots every hour. + Deleting zfs snapshots takes more time than creating them. + There for it's better to delete snapshots once per day... + + + Periodic scripts provide very limited feature set. If you want to use + more advanced setup, you need to call zfSnap from crontab directly. + This way you can combine all sort of parameter combinations. + + Don't forget to check http://wiki.bsdroot.lv/zfsnap for more info. + + Feedback wellcomed: zfsnap@bsdroot.lv + diff --git a/sysutils/zfsnap/pkg-plist b/sysutils/zfsnap/pkg-plist new file mode 100644 index 000000000000..c62e673ab3f2 --- /dev/null +++ b/sysutils/zfsnap/pkg-plist @@ -0,0 +1,15 @@ +sbin/zfSnap +%%PERIODICDIR%%/daily/402.zfSnap +%%PERIODICDIR%%/daily/403.zfSnap_delete +%%PERIODICDIR%%/hourly/402.zfSnap +%%PERIODICDIR%%/monthly/402.zfSnap +%%PERIODICDIR%%/monthly/403.zfSnap_delete +%%PERIODICDIR%%/reboot/402.zfSnap +%%PERIODICDIR%%/weekly/402.zfSnap +%%PERIODICDIR%%/weekly/403.zfSnap_delete +@dirrmtry %%PERIODICDIR%%/weekly +@dirrmtry %%PERIODICDIR%%/reboot +@dirrmtry %%PERIODICDIR%%/monthly +@dirrmtry %%PERIODICDIR%%/hourly +@dirrmtry %%PERIODICDIR%%/daily +@dirrmtry %%PERIODICDIR%% |