- Part 1: Architecture & Strategy
- Part 2: Installing Proxmox VE on ZFS Properly
- Part 3: Running PBS in a VM on Your Main PC
- Part 4: Automated ZFS Snapshots with Sanoid
- Part 5: ZFS Replication Using Syncoid
- Part 6: Backing Up VMs to Proxmox Backup Server
- Part 7: Telegram Notifications for PVE & PBS
- Part 8: Full Backup Automation Scripts
- Part 9: Disaster Recovery Simulation
In Part 2, we built a professional homelab storage layout:
- Proxmox OS + VMs on a fast SSD
- Large ZFS mirror (2× 8TB HDD) for data & backup
- Optimized for performance, reliability, and future automation
Today, we take the next step:
Replicating ZFS datasets from your HDD mirror to Proxmox Backup Server (PBS) using Syncoid, ensuring off-host redundancy and automated backup workflows.
Replication is critical: it protects against disk failure, accidental deletion, and data corruption — all without touching your live VMs on the SSD.
Why ZFS Replication Matters
Snapshots protect your local data, but they only live on the same pool. If the pool dies, the snapshots are gone. Replication solves this:
Benefits of replication to PBS:
- Off-host redundancy
- Incremental transfers (saves bandwidth)
- Easy disaster recovery
- Integration with your automated snapshot policies
With Syncoid, replication is reliable, efficient, and easy to automate.
Key Takeaways
By the end of this guide, you’ll know:
- How to prepare your ZFS HDD mirror for replication
- How to install and configure Syncoid on your Proxmox host
- How to automate replication to PBS with SSH keys
- How to schedule and monitor replication jobs
- Real-world pitfalls and best practices
Step 1 — Prepare the ZFS Mirror for Replication
Before replication:
- Ensure your ZFS mirror is healthy:
zpool status tank
zfs list- Organize datasets for replication. Example structure:
tank/vms
tank/media
tank/backupsEach dataset can be replicated independently, allowing flexible retention policies.
- Confirm snapshots exist. Syncoid replicates snapshots incrementally:
zfs snapshot -r tank@initialStep 2 — Install Syncoid
Syncoid is part of Sanoid, which handles snapshots + replication efficiently.
In the Smart ZFS Snapshot Automation on Proxmox Using Sanoid, we talked about how to install it, take a look.
Step 3 — Configure SSH Access to PBS
Replication requires passwordless SSH access.
- Generate an SSH key on the Proxmox host:
ssh-keygen -t ed25519 -C "replication_key"- Copy the key to PBS server:
ssh-copy-id -i ~/.ssh/id_ed25519.pub root@PBS_SERVER_IP- Test access:
ssh root@PBS_SERVER_IPYou should log in without a password. Syncoid depends on this for automated replication.
Step 4 — Replicate Datasets with Syncoid
Basic command structure:
syncoid tank/vms root@PBS_SERVER_IP:tank/vmsHow It Works:
- First run: full replication of all snapshots
- Subsequent runs: incremental replication (only changes)
- Syncoid preserves snapshot history, retention, and dataset structure
Example for multiple datasets:
syncoid tank/media root@PBS_SERVER_IP:tank/media
syncoid tank/backups root@PBS_SERVER_IP:tank/backupsYour PBS server now stores exact copies of the ZFS datasets, ready for disaster recovery.
Step 5 — Automate Replication with Cron
Create a script /root/replicate_to_pbs.sh:
#!/bin/bash
# Replicate datasets to PBS
syncoid tank/vms root@PBS_SERVER_IP:tank/vms
syncoid tank/media root@PBS_SERVER_IP:tank/media
syncoid tank/backups root@PBS_SERVER_IP:tank/backupsMake it executable:
chmod +x /root/replicate_to_pbs.shAdd a cron job for daily replication at 2 AM:
crontab -e
0 2 * * * /root/replicate_to_pbs.sh >> /var/log/zfs_replication.log 2>&1Step 6 — Monitoring and Alerts
Monitor replication logs:
tail -f /var/log/zfs_replication.logOptional: integrate Telegram notifications (covered in Part 7) for:
- Failures
- Successful replication
- Snapshot retention alerts
This ensures you never miss a backup issue.
Step 7 — Best Practices & Pitfalls
| Mistake | Why It Fails | Correct Approach |
|---|---|---|
| Replicating without snapshots | Syncoid cannot do incremental replication | Always create snapshots before replication |
| Using same pool for production and backup | Disk failure destroys both | Separate SSD (VMs) and ZFS HDD mirror |
| Overwriting datasets accidentally | Data loss | Test Syncoid commands with --no-sync dry run |
| Ignoring retention | PBS fills up fast | Use consistent snapshot & replication retention policies |
Step 8 — How This Fits Into Our Backup Architecture
Layered backup workflow:
- Layer 1 — ZFS Snapshots on HDD Mirror
Fast local rollback for files & datasets - Layer 2 — Syncoid Replication to PBS
Off-host redundancy, incremental, bandwidth-efficient - Layer 3 — PBS VM Backups
Deduplicated VM images, disaster recovery-ready
This ensures triple protection: snapshots, replication, and PBS archives.
Summary
With Syncoid replication to PBS:
- Your ZFS datasets are safe off-host
- Incremental replication saves bandwidth
- Snapshots + replication give a robust, automated backup system
- Integrated with PBS, your VMs and data are disaster-recovery ready
Next Step
In Part 6, we’ll dive into backing up Proxmox VMs to PBS, combining deduplicated archives with our replication setup for a full enterprise-style homelab backup workflow.
- Part 1: Architecture & Strategy
- Part 2: Installing Proxmox VE on ZFS Properly
- Part 3: Running PBS in a VM on Your Main PC
- Part 4: Automated ZFS Snapshots with Sanoid
- Part 5: ZFS Replication Using Syncoid
- Part 6: Backing Up VMs to Proxmox Backup Server
- Part 7: Telegram Notifications for PVE & PBS
- Part 8: Full Backup Automation Scripts
- Part 9: Disaster Recovery Simulation
Mohammad Dahamshi is a skilled Embedded Software Engineer and web developer. With experience in C/C++, Linux, WordPress, and DevOps tools, he helps businesses solve technical challenges and build reliable digital solutions. Fluent in Arabic, Hebrew, and English, he also runs Saratec, offering web design and digital marketing services.

[…] Automating ZFS Replication Between Servers […]