Skip to main content

ZFS incremental snapshot dump and restore tool

Project description

PyPI version


This tool is primarily intended to be used to backup zfs servers to foreign file systems with the offsite backup use case in mind. It's intended to be ran from outside the ZFS box, and uses passwordless ssh login to perform zfs operations.


Simply pip install, after which you will be able to use snapdump

$ pip install snapdump
$ snapdump -v
snapdump 1.0.6

You will need to start by creating a config file, see config.sample.yml for an example.

in addition, you need password-less ssh root access to your server. See restricted_shell/ for details about improving security.


  • Incremental snapshot dump and restore
  • Taking zfs snapshots automatically
  • Automatic cleanup of both ZFS znapshots and dumped files

Script is intended to be executed from a cron job, at a high frequency. it will not do anything if the correct interval has not passed.



backup will create full or incremental snapshots of each dataset mentioend in the config, and will also perform cleanup By default, backup will also verify the integrity of the dumped snapshot, this can be disabled by using --no-verify

$ snapdump -c /path-to-config/config.yml backup
Creating incremental snapshot dump for storage/home@2018_12_14__00_23_58 based on 2018_12_14__00_21_47
Creating incremental snapshot dump for storage/datasets01@2018_12_14__00_23_58 based on 2018_12_14__00_21_47


Listing all current snapshots per dataset.

snapdump -c /path-to-config/config.yml list
	= storage/home@2018_12_10__19_20_34
	+ storage/home@2018_12_14__00_21_47
	+ storage/home@2018_12_14__00_23_58
	= storage/datasets01@2018_12_11__04_47_33
	+ storage/datasets01@2018_12_14__00_21_47
	+ storage/datasets01@2018_12_14__00_23_58

Each snapshot is prefixed with = or +, to indicate if it's a full (=) or incremental (+) snapshot.


Restore will take a snapshot name and optionally a destination dataset and restore it. it will work correctly for incremental snapshots as well. if destination dataset name is not provided, a new dataset with the suffix _restore will be created.

$ snapdump -c /path-to-config/config.yml restore -s storage/datasets01@2018_12_14__00_23_58 
Restoring snapshot storage/datasets01@2018_12_14__00_23_58 to storage/datasets01_restore


Initiate the cleanup, this is not normally needed because backup is cleaning up automatically

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snapdump-1.0.7.tar.gz (7.1 kB view hashes)

Uploaded source

Built Distribution

snapdump-1.0.7-py3-none-any.whl (8.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page