diff options
Diffstat (limited to 'filesystems/zfs-periodic')
-rw-r--r-- | filesystems/zfs-periodic/Makefile | 43 | ||||
-rw-r--r-- | filesystems/zfs-periodic/distinfo | 3 | ||||
-rw-r--r-- | filesystems/zfs-periodic/pkg-descr | 2 | ||||
-rw-r--r-- | filesystems/zfs-periodic/pkg-message | 30 |
4 files changed, 78 insertions, 0 deletions
diff --git a/filesystems/zfs-periodic/Makefile b/filesystems/zfs-periodic/Makefile new file mode 100644 index 000000000000..33b3525a8c5b --- /dev/null +++ b/filesystems/zfs-periodic/Makefile @@ -0,0 +1,43 @@ +PORTNAME= zfs-periodic +PORTVERSION= 1.0.20130213 +CATEGORIES= filesystems sysutils + +MAINTAINER= peter@pean.org +COMMENT= Simple way of maintaining zfs snapshots using the periodic system +WWW= https://github.com/ross/zfs-periodic + +USE_GITHUB= yes +GH_ACCOUNT= ross +GH_TAGNAME= a481121 + +NO_ARCH= yes +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 + +PLIST_FILES= ${PERIODIC_FILES} bin/zfs-snapshot + +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 ${STAGEDIR}${PREFIX}/bin +.for _dir in ${PERIODIC_DIRS} + @${MKDIR} ${STAGEDIR}${PREFIX}/${_dir} +.endfor + +.for _file in ${PERIODIC_FILES} + ${INSTALL_SCRIPT} ${WRKSRC}/${_file} ${STAGEDIR}${PREFIX}/${_file} +.endfor + +.include <bsd.port.mk> diff --git a/filesystems/zfs-periodic/distinfo b/filesystems/zfs-periodic/distinfo new file mode 100644 index 000000000000..6dc4d093226b --- /dev/null +++ b/filesystems/zfs-periodic/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1730905184 +SHA256 (ross-zfs-periodic-1.0.20130213-a481121_GH0.tar.gz) = e0d12bb3ff466e3aaabd09c2b9685b5e5ee5f91e0d62126c05ba33c60a7b9a9b +SIZE (ross-zfs-periodic-1.0.20130213-a481121_GH0.tar.gz) = 2527 diff --git a/filesystems/zfs-periodic/pkg-descr b/filesystems/zfs-periodic/pkg-descr new file mode 100644 index 000000000000..29e40518d2ff --- /dev/null +++ b/filesystems/zfs-periodic/pkg-descr @@ -0,0 +1,2 @@ +Scripts that uses the periodic system to create and manage zfs +snapshots. Easily configured via /etc/periodic.conf diff --git a/filesystems/zfs-periodic/pkg-message b/filesystems/zfs-periodic/pkg-message new file mode 100644 index 000000000000..010d2e7d1ce1 --- /dev/null +++ b/filesystems/zfs-periodic/pkg-message @@ -0,0 +1,30 @@ +[ +{ type: install + message: <<EOM +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_snapshot_pools="tank" +monthly_zfs_snapshot_keep=2 + +To get hourly snapshots you also need to add +something like this to /etc/crontab: + +2 * * * * root periodic hourly +EOM +} +] |