diff options
Diffstat (limited to 'filesystems/zfstools')
-rw-r--r-- | filesystems/zfstools/Makefile | 36 | ||||
-rw-r--r-- | filesystems/zfstools/distinfo | 3 | ||||
-rw-r--r-- | filesystems/zfstools/files/pkg-message.in | 32 | ||||
-rw-r--r-- | filesystems/zfstools/pkg-descr | 2 | ||||
-rw-r--r-- | filesystems/zfstools/pkg-plist | 9 |
5 files changed, 82 insertions, 0 deletions
diff --git a/filesystems/zfstools/Makefile b/filesystems/zfstools/Makefile new file mode 100644 index 000000000000..53d733ceddb3 --- /dev/null +++ b/filesystems/zfstools/Makefile @@ -0,0 +1,36 @@ +PORTNAME= zfstools +DISTVERSIONPREFIX=v +DISTVERSION= 0.3.6 +PORTREVISION= 2 +CATEGORIES= filesystems sysutils ruby +MASTER_SITES= GH \ + http://mirror.shatow.net/freebsd/${PORTNAME}/ + +MAINTAINER= bdrewery@FreeBSD.org +COMMENT= OpenSolaris-compatible auto snapshotting for ZFS +WWW= https://github.com/bdrewery/zfstools + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +USES= ruby shebangfix +SHEBANG_FILES= bin/* + +USE_GITHUB= yes +GH_ACCOUNT= bdrewery + +NO_BUILD= yes + +SUB_FILES= pkg-message + +OPTIONS_DEFINE= DOCS + +.include <bsd.port.options.mk> + +do-install: + @cd ${WRKSRC}/bin && ${COPYTREE_BIN} . ${STAGEDIR}${PREFIX}/sbin + @cd ${WRKSRC}/lib && ${COPYTREE_SHARE} . ${STAGEDIR}${RUBY_SITELIBDIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} + +.include <bsd.port.mk> diff --git a/filesystems/zfstools/distinfo b/filesystems/zfstools/distinfo new file mode 100644 index 000000000000..3975d23051b6 --- /dev/null +++ b/filesystems/zfstools/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1730905190 +SHA256 (bdrewery-zfstools-v0.3.6_GH0.tar.gz) = 060112d89f11e95415f07cdbc05fef29a6a1bc5046046c56d37f16b1232fb2cf +SIZE (bdrewery-zfstools-v0.3.6_GH0.tar.gz) = 12323 diff --git a/filesystems/zfstools/files/pkg-message.in b/filesystems/zfstools/files/pkg-message.in new file mode 100644 index 000000000000..6df0d4d832a2 --- /dev/null +++ b/filesystems/zfstools/files/pkg-message.in @@ -0,0 +1,32 @@ +[ +{ type: install + message: <<EOM +To enable automatic snapshots, place lines such as these into /etc/crontab: + + PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin + 15,30,45 * * * * root %%PREFIX%%/sbin/zfs-auto-snapshot frequent 4 + 0 * * * * root %%PREFIX%%/sbin/zfs-auto-snapshot hourly 24 + 7 0 * * * root %%PREFIX%%/sbin/zfs-auto-snapshot daily 7 + 14 0 * * 7 root %%PREFIX%%/sbin/zfs-auto-snapshot weekly 4 + 28 0 1 * * root %%PREFIX%%/sbin/zfs-auto-snapshot monthly 12 + +This will keep 4 15-minutely snapshots, 24 hourly snapshots, 7 daily snapshots, +4 weekly snapshots and 12 monthly snapshots. Any resulting zero-sized snapshots +will be automatically cleaned up. + +Enable snapshotting on a dataset or top-level pool with: + + zfs set com.sun:auto-snapshot=true DATASET + +Children datasets can be disabled for snapshot with: + + zfs set com.sun:auto-snapshot=false DATASET + +Or for specific intervals: + + zfs set com.sun:auto-snapshot:frequent=false DATASET + +See website and command usage output for further details. +EOM +} +] diff --git a/filesystems/zfstools/pkg-descr b/filesystems/zfstools/pkg-descr new file mode 100644 index 000000000000..3fbffa57a0df --- /dev/null +++ b/filesystems/zfstools/pkg-descr @@ -0,0 +1,2 @@ +ZFSTools is an OpenSolaris-like and compatible auto snapshotting +script, which also supports auto snapshotting mysql databases. diff --git a/filesystems/zfstools/pkg-plist b/filesystems/zfstools/pkg-plist new file mode 100644 index 000000000000..1dc611682ff4 --- /dev/null +++ b/filesystems/zfstools/pkg-plist @@ -0,0 +1,9 @@ +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%RUBY_SITELIBDIR%%/zfstools.rb +%%RUBY_SITELIBDIR%%/zfstools/dataset.rb +%%RUBY_SITELIBDIR%%/zfstools/features.rb +%%RUBY_SITELIBDIR%%/zfstools/pool.rb +%%RUBY_SITELIBDIR%%/zfstools/snapshot.rb +sbin/zfs-auto-snapshot +sbin/zfs-cleanup-snapshots +sbin/zfs-snapshot-mysql |