Your prayer, answered.
zeus is a tool for performing backups onto another zfs pool which is physically connected to the machine.
go get github.com/reconquest/zeus/cmd/....
Create pool named
Mark dataset which you want to backup:
zfs zeus:backup=on <your-dataset>.
Run zeus like this:
sudo zeusd backup.
It is possible to use zeus with encrypted filesystems.
Currently, only pools with root filesystem encrypted are supported.
To use zeus with encryption:
Create pool with encrypted root filesystem:
sudo zpool create zbackup -O encryption=on -O keyformat=passphrase -m none <vdev-configuration>
Provide executable named
zfs-encryption-keyin your path which will accept single argument with your backup pool name (e.g.
zbackup) and will output encryption key to stdout.
#!/bin/bash sudo -u operator sh -c "carcosa -p ~/.secrets/my -cG zfs/$1"
Note on holds
zeus will enforce additional protection for lately made snapshots by using
zfs hold with
zeus tag to avoid accidental deletion which will make further
incremental backups impossible.
If you need to delete those snapshots, you always can release this lock by using:
zfs release zeus <snapshot>.
Note on backup filesystem names
By default zeus will receive source snapshots into paths like this:
<hostname>part can be configured via config file.
guid:<guid>is namespace based on source snapshot GUID which is unique and is required to avoid conflicts when you backup parts of the same hierarchy, like
zeus has two ways of configuration:
- via config file
zeusdis run by root,
zeusdis run by user.
zfsproperties, namespaced with
Config file is used mostly for static configuration and meant to be changed just once for initial configuration.
zfs properties are meant to be used for specifying which datasets you want to
backup and fine-tune other backup process parameters.
Config file is written in TOML.
If you want to use different backup pool name you need to change it in config file.
zeus.conf.example for structure of configuration file and options
All zeus-related properties are prefixed with
zfs properties are supported:
on— enable backup on given filesystem,
off— disable backup on given filesystem.
by-count): specifying which housekeeping policy to apply after backup. Housekeeping is process of cleaning up old snapshots. zeus will attempt to clean up only snapshots managed by zeus.
none— do not apply any housekeeping.
by-count— clean up snapshots when their amount exceeds specified numbers. See next for more parameters for
1): specifies how many snapshots keep on given filesystem. At least one snapshot required for incremental backups to work.
10): specifies how many snapshots keep on target backup pool. At least one snapshot required for incremental backups to work.
It is possible to test how zeus works without real backup pool.
Create test file-based temporary pool by using:
truncate --size 10G test.img sudo zpool create zbackup `pwd`/test.img -f -m none
zeus:backup=onon any of yours filesystems.
zeusd backup --no-export.