# ZFS snapshots

Docs: https://github.com/bdrewery/zfstools

```
pkg install zfstools
```

```
zfs set com.sun:auto-snapshot=true zroot/data/syncthing
zfs set snapdir=visible zroot/data/syncthing
```

```
15,30,45 * * * * /usr/local/sbin/zfs-auto-snapshot frequent 4
0 * * * * /usr/local/sbin/zfs-auto-snapshot hourly 24
7 0 * * * /usr/local/sbin/zfs-auto-snapshot daily 14
14 0 * * 7 /usr/local/sbin/zfs-auto-snapshot weekly 12
28 0 1 * * /usr/local/sbin/zfs-auto-snapshot monthly 24
*/20 * * * * /usr/local/sbin/zfs-cleanup-snapshots
```

See:
* https://github.com/j-keck/zfs-snap-diff