BSD Ports

filesystems/zfstools 0.3.6_2 DragonFly

OpenSolaris-compatible auto snapshotting for ZFS

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
BSD2CLAUSE
Categories
filesystems, ruby, sysutils
Package size
8.6 KiB, 25.4 KiB installed

Description

ZFSTools is an OpenSolaris-like and compatible auto snapshotting script, which also supports auto snapshotting mysql databases.

In the other systems

SystemPortVersion
DragonFlyfilesystems/zfstools0.3.6_2
FreeBSDfilesystems/zfstools0.3.6_3
MidnightBSDfilesystems/zfstools0.3.6_1
HardenedBSDfilesystems/zfstools0.3.6_3
GhostBSDfilesystems/zfstools0.3.6_3

Install

Binary package:

pkg install zfstools

From DPorts:

cd /usr/dports/filesystems/zfstools && make install clean

Dependencies

Run dependencies 1

No port depends on this one.

Configuration

No options to configure.

Service scripts
none

Message after installing

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 /usr/local/sbin/zfs-auto-snapshot frequent  4
    0        * * * * root /usr/local/sbin/zfs-auto-snapshot hourly   24
    7        0 * * * root /usr/local/sbin/zfs-auto-snapshot daily     7
    14       0 * * 7 root /usr/local/sbin/zfs-auto-snapshot weekly    4
    28       0 1 * * root /usr/local/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.