Skip to content

alunduil/zfs-replicate

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
nix
 
 
zfs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

zfs-replicate

https://github.com/alunduil/zfs-replicate

By Alex Brandt alunduil@gmail.com

Description

zfs-replicate sends all ZFS snapshots to a remote host via SSH. zfs-replicate does not create ZFS snapshots.

zfs-replicate is based on autorepl.py used by FreeNAS.

zfs-replicate is related to several other projects which fit other niches:

  1. sanoid: A full snapshot management system. Its companion application, syncoid, handles replication with many available options.
  2. 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).
  3. znapzend: Another scheduling and replicating system.
  4. zrep: A SH script with several control commands for snapshot replication.

Terms of Use

You are free to copy, modify, and distribute zfs-replicate with attribution under the terms of the BSD-2-Clause licence. See the LICENSE for details.

Prerequisites

  1. A remote system with a ZFS filesystem and the zfs CLI tools
  2. SSH access to that remote system
  3. If you're not using the root user remotely:
    1. Ensure the user can mount filesystems
      1. FreeBSD: sysctl -w vfs.usermount=1
    2. Add ZFS permissions
      1. Command: zfs allow ${USER} ${PERMISSIONS} ${BACKUP_DATASET}
      2. Permissions
        1. clone
        2. create
        3. destroy
        4. hold
        5. mount
        6. promote
        7. quota
        8. readonly
        9. receive
        10. rename
        11. reservation
        12. rollback
        13. send
        14. snapshot
  4. A local ZFS filesystem and zfs CLI tools

N.B., don't use the root user to access your remote system.

How to use zfs-replicate

  1. poetry install
  2. poetry run -- zfs-replicate --help

Documentation

Getting Support

  • GitHub issues: Report any problems or features requests to GitHub issues.