diff options
author | mm <mm@FreeBSD.org> | 2016-06-30 16:48:00 +0800 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2016-06-30 16:48:00 +0800 |
commit | 73f08beb6e0ecd455cc294bd717b8848fd518a3f (patch) | |
tree | e9164b5333422519f4df06229e3e4069b7c80e6a /sysutils | |
parent | f3b315a57204468f850469b709044eba436bb114 (diff) | |
download | freebsd-ports-gnome-73f08beb6e0ecd455cc294bd717b8848fd518a3f.tar.gz freebsd-ports-gnome-73f08beb6e0ecd455cc294bd717b8848fd518a3f.tar.zst freebsd-ports-gnome-73f08beb6e0ecd455cc294bd717b8848fd518a3f.zip |
zfsnap makes rolling ZFS snapshots easy and - with cron - automatic.
The main advantages of zfsnap are its portability, simplicity, and performance.
It is written purely in /bin/sh and does not require any additional software -
other than a few core *nix utilies.
zfsnap stores all the information it needs about a snapshot directly in its
name; no database or special ZFS properties are needed. The information is
stored in a way that is human readable, making it much easier for a sysadmin to
manage and audit backup schedules.
Snapshot names are in the format of pool/fs@[prefix]Timestamp--TimeToLive
(e.g. pool/fs@weekly-2014-04-07_05.30.00--6m). The prefix is optional but can
be quite useful for filtering, Timestamp is the date and time when the snapshot
was created, and TimeToLive (TTL) is the amount of time the snapshot will be
kept until it can be deleted.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/zfsnap-devel/Makefile | 51 | ||||
-rw-r--r-- | sysutils/zfsnap-devel/distinfo | 3 | ||||
-rw-r--r-- | sysutils/zfsnap-devel/pkg-descr | 16 | ||||
-rw-r--r-- | sysutils/zfsnap-devel/pkg-plist | 13 |
5 files changed, 84 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 17aba343fa0a..024b02f273a8 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1229,6 +1229,7 @@ SUBDIR += zfs-stats SUBDIR += zfs-stats-lite SUBDIR += zfsnap + SUBDIR += zfsnap-devel SUBDIR += zfstools SUBDIR += zidrav SUBDIR += zisofs-tools diff --git a/sysutils/zfsnap-devel/Makefile b/sysutils/zfsnap-devel/Makefile new file mode 100644 index 000000000000..e81a983bfe9d --- /dev/null +++ b/sysutils/zfsnap-devel/Makefile @@ -0,0 +1,51 @@ +# Created by: Martin Matuska <mm@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= zfsnap +DISTVERSIONPREFIX= v +DISTVERSION= 2.0.0-beta2 +CATEGORIES= sysutils +PKGNAMESUFFIX= -devel + +MAINTAINER= mm@FreeBSD.org +COMMENT= Portable performant script to make rolling ZFS snapshots easy + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +NO_BUILD= yes +USE_GITHUB= yes +GH_TAGNAME= af91bd21c848751176ccce0ae314e3c0feb75cc5 + +OPTIONS_DEFINE= BASH ZSH +OPTIONS_DEFAULT= BASH ZSH +OPTIONS_SUB= yes + +PORTDOCS= AUTHORS NEWS PORTABILITY README.md + +post-patch: + @${REINPLACE_CMD} -e "s,# ZFSNAP_LIB_DIR=.*,ZFSNAP_LIB_DIR=${PREFIX}/share/zfsnap,g" ${WRKSRC}/sbin/zfsnap.sh + +do-install: + ${INSTALL_SCRIPT} ${WRKSRC}/sbin/zfsnap.sh ${STAGEDIR}${PREFIX}/sbin/zfsnap + cd ${WRKSRC}/share && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/share + ${INSTALL_MAN} ${WRKSRC}/man/man8/zfsnap.8 ${STAGEDIR}${MAN8PREFIX}/man/man8/zfsnap.8 + ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + cd ${WRKSRC} && ${COPYTREE_SHARE} completion ${STAGEDIR}${EXAMPLESDIR} + cd ${WRKSRC} && ${COPYTREE_SHARE} periodic ${STAGEDIR}${EXAMPLESDIR} + ${MKDIR} ${STAGEDIR}${DOCSDIR} +.for file in ${PORTDOCS} + ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}/${file} +.endfor + +post-install-BASH-on: + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d + ${INSTALL_DATA} ${WRKSRC}/completion/zfsnap-completion.bash \ + ${STAGEDIR}${PREFIX}/etc/bash_completion.d/zfsnap.sh + +post-install-ZSH-on: + ${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions + ${INSTALL_DATA} ${WRKSRC}/completion/zfsnap-completion.bash \ + ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_zfsnap + +.include <bsd.port.mk> diff --git a/sysutils/zfsnap-devel/distinfo b/sysutils/zfsnap-devel/distinfo new file mode 100644 index 000000000000..ee39a70ee6a9 --- /dev/null +++ b/sysutils/zfsnap-devel/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1467272284 +SHA256 (zfsnap-zfsnap-v2.0.0-beta2-af91bd21c848751176ccce0ae314e3c0feb75cc5_GH0.tar.gz) = 61bbfce1218790a30af5d6ace5580af14626012cb0c93c1727a766930aeb5e01 +SIZE (zfsnap-zfsnap-v2.0.0-beta2-af91bd21c848751176ccce0ae314e3c0feb75cc5_GH0.tar.gz) = 29976 diff --git a/sysutils/zfsnap-devel/pkg-descr b/sysutils/zfsnap-devel/pkg-descr new file mode 100644 index 000000000000..e5aa55629cad --- /dev/null +++ b/sysutils/zfsnap-devel/pkg-descr @@ -0,0 +1,16 @@ +zfsnap makes rolling ZFS snapshots easy and - with cron - automatic. + +The main advantages of zfsnap are its portability, simplicity, and performance. +It is written purely in /bin/sh and does not require any additional software - +other than a few core *nix utilies. + +zfsnap stores all the information it needs about a snapshot directly in its +name; no database or special ZFS properties are needed. The information is +stored in a way that is human readable, making it much easier for a sysadmin to +manage and audit backup schedules. + +Snapshot names are in the format of pool/fs@[prefix]Timestamp--TimeToLive +(e.g. pool/fs@weekly-2014-04-07_05.30.00--6m). The prefix is optional but can +be quite useful for filtering, Timestamp is the date and time when the snapshot +was created, and TimeToLive (TTL) is the amount of time the snapshot will be +kept until it can be deleted. diff --git a/sysutils/zfsnap-devel/pkg-plist b/sysutils/zfsnap-devel/pkg-plist new file mode 100644 index 000000000000..120323f3ae49 --- /dev/null +++ b/sysutils/zfsnap-devel/pkg-plist @@ -0,0 +1,13 @@ +man/man8/zfsnap.8.gz +sbin/zfsnap +share/zfsnap/commands/destroy.sh +share/zfsnap/commands/recurseback.sh +share/zfsnap/commands/snapshot.sh +share/zfsnap/core.sh +%%BASH%%etc/bash_completion.d/zfsnap.sh +%%ZSH%%share/zsh/site-functions/_zfsnap +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/periodic/xPERIODICx_zfsnap_delete.sh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/periodic/xPERIODICx_zfsnap.sh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/completion/zfsnap-completion.bash +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/completion/zfsnap-completion.tcsh +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/completion/zfsnap-completion.zsh |