zfSnap is a simple sh script for creating ZFS snapshots. When called from
cron rolling snapshots can be created and deleted automatically. The main
advantage of zfSnap is that it is written in 100% pure /bin/sh, does not
require any additional software to run, and is simple to use.
zfSnap keeps all information about snapshot in snapshot name. zfs snapshot
names are in form: Timestamp--TTL where timestamp is date and time of
snapshot creation and TTL is Time To Live in human readable form.
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 periodically
(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 hard-coded
(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 https://github.com/graudeejs/zfSnap/wiki for more
info.
Feedback welcomed: graudeejs@gmail.com
filesystems: add new category for file systems and related utilities
The filesystems category houses file systems and file system utilities.
It is added mainly to turn the sysutils/fusefs-* pseudo-category into
a proper one, but is also useful for the sundry of other file systems
related ports found in the tree.
Ports that seem like they belong there are moved to the new category.
Two ports, sysutils/fusefs-funionfs and sysutils/fusefs-fusepak are
not moved as they currently don't fetch and don't have TIMESTAMP set
in their distinfo, but that is required to be able to push a rename
of the port by the pre-receive hook.
Approved by: portmgr (rene)
Reviewed by: mat
Pull Request: https://github.com/freebsd/freebsd-ports/pull/302
PR: 281988
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
sysutils: remove 'Created by' lines
A big Thank You to the original contributors of these ports:
* <jsmith@resonatingmedia.com>
* Aaron Dalton <aaron@FreeBSD.org>
* Aaron Landwehr <aaron@snaphat.com>
* Adam Weinberger <adamw@FreeBSD.org>
* Adrian Chadd
* Adrian Chadd <adrian@FreeBSD.org>
* Akinori MUSHA aka knu <knu@idaemons.org>
* Alan Eldridge <alane@FreeBSD.org>
* Alan Eldridge <alane@geeksrus.net>
* Aldis Berjoza <aldis@bsdroot.lv>
* Alex Deiter <alex.deiter@gmail.com>
(Only the first 15 lines of the commit message are shown above )
sysutils/zfsnap: fix -s/-S mode.
Move creation of files from "do-patch" to "post-extract" target,
so that patches from files/ directory get applied.
While here, add LICENSE.
PR: 223951
Submitted by: Anton Sayetsky <vsasjason@gmail.com> (based on)
Approved by: yamagi@yamagi.org (maintainer timeout, 7 weeks)
Assign maintainership to submitter of the last PR committed to this
port who volunteered via email.
PR: 192987
Submitted by: yamagi@yamagi.org (New maintainer)
Fix zfsnap.
The project has changed location. I have verified the old and new
tarballs by hand and the contents (except the directory name) are
identical.
PR: 192705
The vast majority of pkg-descr files had the following format when they
had both lines:
Author: ...
WWW: ....
So standardize on that, and move them to the end of the file when necessary.
Also fix some more whitespace, and remove more "signature tags" of varying
forms, like -- name, etc.
s/AUTHOR/Author/
A few other various formatting issues
- Update zfSnap to 1.10.0
This includes a workaround for use with zpool v28. See UPDATING for
more information.
PR: ports/157621
Submitted by: Aldis Berjoza <aldis@bsdroot.lv> (maintainer)
- Update to 1.8.2
Changes:
- Add -s & -S switches to prevent actions on pool while resilvering
or scrubing pool
PR: ports/153927
Submitted by: Aldis Berjoza <aldis@bsdroot.lv> (maintainer)
Feature safe: yes
- Update to 1.3.2
- This version specifies the full path to the zfs binary (ie. /sbin/zfs)
PR: ports/150758
Submitted by: Aldis Berjoza <aldis at bsdroot.lv> (maintainer)
- Add new port sysutils/zfsnap:
zfSnap is very simple sh script to make periodic zfs snapshots with cron.
It will also delete old snapshots.
WWW: http://aldis.git.bsdroot.lv/zfSnap
PR: ports/149188
Submitted by: Aldis Berjoza <aldis at bsdroot.lv>