Skip to main content

PyPI version

Snapdump

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.

Installation

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/README.md for details about improving security.

Features

  • 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.

Commands

backup

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

list

Listing all current snapshots per dataset.

snapdump -c /path-to-config/config.yml list
storage/home:
	= 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:
	= 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

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

cleanup

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

Metadata

Release files for snapdump 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snapdump 1.0.7
File Size Uploaded
snapdump-1.0.7.tar.gz 7.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snapdump 1.0.7
File Interpreter ABI Platform
snapdump-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 15.5 kB

Release files / snapdump-1.0.7.tar.gz

Download URL snapdump-1.0.7.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1e0f705db1e62664a6225810c85840684f50cf1ccd81d7588849fb565063d916
BLAKE2b-256 checksum
How to use checksums
09a786ec44c4b18963a02e6751c5e5f3fd222e2c855f9a4f0d715df7c316604c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.9

Release files / snapdump-1.0.7-py3-none-any.whl

Download URL snapdump-1.0.7-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc6bb8cfb0de9edb775f1eeadd8af02b0ab07c33165f4952171260bb6b1c9d20
BLAKE2b-256 checksum
How to use checksums
cd825a7c3c2c3c8053797540510f5e1c970d92e237a711f1f8b906b5e4e16882
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page