What is Syncoid and How It Can Be Useful

If you use ZFS on Linux or BSD, you might have datasets and snapshots that need to be replicated between servers.
Syncoid is a tool that simplifies ZFS replication and backup.


Why Syncoid?

  • Automates snapshot replication — copies snapshots between datasets or servers.
  • Incremental transfers — only changes are sent over the network, saving bandwidth.
  • Easy CLI usage — no need to write complex ZFS send/receive scripts.
  • Supports remote hosts — replication over SSH is built-in.

Example: Basic Syncoid Usage

Assume you have a source dataset tank/data and want to replicate it to backup/data on a remote server:

syncoid tank/data root@backup-server:backup/data

This will:

  • Create snapshots if needed.
  • Send only changes since the last snapshot. -Receive and apply them on the target dataset.

Advanced Usage

  • Cron jobs — automate regular replication.
  • Retention policies — keep last N snapshots on target.
  • Dry-run mode — preview what would be sent.

Example backup

#!/bin/bash

CONTAINER_NAME="mysql-db"
REMOTE_NAME="172.16.10.120"
REMOTE_USER="backup-lxd"


TOKEN="Your_TG_Token"
CHAT_ID="Your_ChatID"
ZFS_VOLUME="lxdpool/containers"


send_telegram_message() {
    local message=$1
    curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendMessage" \
        -d "chat_id=$CHAT_ID" \
        -d "text=$message"
}


date
echo 'Starting backup'
if ! syncoid --create-bookmark --compress zstd-fast ${ZFS_VOLUME}/${CONTAINER_NAME}  ${REMOTE_USER}@${REMOTE_NAME}:${ZFS_VOLUME}/${CONTAINER_NAME};  then
    echo 'Backup failed'
    send_telegram_message "Backup of $CONTAINER_NAME failed on $(hostname)"
    exit 1
fi
echo 'Backup Finished'
date

First transfer will be long if container data is huge enough, but next runs will sync only increments, making them very fast

Conclusion

Syncoid is a powerful ZFS replication tool. It simplifies snapshot management, incremental backups, and remote replication. If you manage ZFS datasets and want safe, automated replication, Syncoid is definitely worth learning.