Skip to main content

ZFS Snapshot Replicator

Project description

Description

ZFS Replicate Utility

A small command line utility to handle remote replication of ZFS snapshots using SSH.

This project is directly based on the autorepl.py script used by FreeNAS.

I am providing code in the repository to you under an open source license. Because this is my personal repository, the license you receive to my code is from me and not my employer (Facebook).

Getting Started

Usage is pretty straight-forward and documented in the command’s help output. For more information on ZFS snapshots, see: Working With Oracle Solaris ZFS Snapshots and Clones

Remote Configuration

If you’re replicating using the root user’s credentials, you should really reconsider, but this script should just work.

Otherwise, you’ll not only need to ensure the user you’re using has SSH access to the remote host, but also can mount filesystems (if this is desirable) and has ZFS permissions configured correctly.

Allow user to mount (FreeBSD):

sysctl -w vfs.usermount=1

ZFS Permissions:

zfs allow backup create,destroy,snapshot,rollback,clone,promote,rename,mount,send,receive,quota,reservation,hold storage

More information about this configuration can be found at the following sources:

Compared to Other Tools

This tool is only for replication of snapshots. It assumes that another system is creating them on a regular basis. It also doesn’t require installation of any special tools (other than the standard shell scripts) on the remote host.

Other tools fill other niches:

sanoid

A full snapshot management system. Its companion application, syncoid, handles replication with many available options.

zfs-replicate (BASH)

A very similar project. The major differences are configuration style (our project uses parameters whereas this project uses a BASH script), and the system expectations (e.g., logging controls).

znapzend

Another scheduling and replicating system.

zrep

A SH script with several control commands for snapshot replication.

More information has been captured in this survey.

Reporting Issues

Any issues discovered should be recorded on Github. If you believe you’ve found an error or have a suggestion for a new feature, please ensure that it is reported.

If you would like to contribute a fix or new feature, please submit a pull request. This project follows git flow and utilizes travis to automatically check pull requests before a manual review.

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

zfs-replicate-1.1.2.tar.gz (19.8 kB view hashes)

Uploaded Source

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