summaryrefslogtreecommitdiffstats
path: root/system/sanoid/README
blob: b620a57bfb153c0ef7d3e57041c21d4e8658588a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Policy-driven snapshot management and replication tools. Using ZFS for
underlying next-gen storage. Primarily intended for Linux, but BSD use
is supported and reasonably frequently tested.

You can use sanoid to create, automatically thin, and monitor
snapshots and pool health from a single eminently human-readable TOML
config file at /etc/sanoid/sanoid.conf.

DEPENDENCIES

SANOID depends on the Perl module Config::IniFiles and will not
operate without it. Config::IniFiles may be installed from CPAN,
though the project strongly recommends using your distribution's
repositories instead.

SYNCOID depends on ssh, pv, gzip, lzop, and mbuffer. It can run with
reduced functionality in the absence of any or all of the above. SSH
is only required for remote synchronization.

CRON

If you use cron there is the need to ensure that only one instance of
sanoid is run at any time (or else there will be funny error messages
about missing snapshots, ...). It's also good practice to separate
the snapshot taking and pruning so the later won't block the former
in case of long running pruning operations. Following is the
recommend setup for a standard install:

*/15 * * * * root flock -n /var/run/sanoid/cron-take.lock -c \
  "TZ=UTC sanoid --take-snapshots"
*/15 * * * * root flock -n /var/run/sanoid/cron-prune.lock -c \
  "sanoid --prune-snapshots"

Adapt the timer interval to the lowest configured snapshot interval.

CONFIGURATION

SANOID won't do anything useful unless you tell it how to handle your
ZFS datasets in `/etc/sanoid/sanoid.conf`.

Take a look at the files `sanoid.defaults.conf` and `sanoid.conf` for
all possible configuration options.

Also have a look at the README.md for a simpler suggestion for
`sanoid.conf`.

SYNCOID is a command line utility that doesn't require any
configuration, with all of its switches set at runtime.