Russel053/ 20 1 月, 2018/ VM, ZFS, 儲存/檔案系統

Main features

  • Speed limiter
  • Syncing interval can be set by cron
  • Syncing VM (disks and config) but also ZFS Datasets
  • Can keep multiple backups
  • Can be used in both directions
  • Can send on local host
  • Traffic is encrypted

預設Web 抄寫與 zsync 比較:

這邊重要的一點 zync 是不支援遷移的,另外主要是用在備份上面,不太適合HA。


apt-get install pve-zsync


                      VMID    目標IP 儲存池 詳細列出狀態  快照數       名稱   每秒最大傳送速度(Byte)
pve-zsync sync –source 124 –dest IP:RAID –verbose –maxsnap 0 –name VM –limit 102400


ssh [email protected] — zfs list -rt snapshot -Ho name IP:RAID/[email protected]_VM_2017-06-23_16:17:20


send from @ to RAID/[email protected]_VM_2017-06-23_16:18:00 estimated size is 59.5G
total estimated size is 59.5G

接下來傳送VM 配置檔案:

scp  /etc/pve/qemu-server/124.conf [email protected]:/etc/pve/qemu-server/

傳送完成之後編輯設定檔修改為當前Server 儲存池名稱:

virtio0: RAID:vm-124-disk-1,size=64G



pve-zsync create --source --dest tank/backup --verbose --maxsnap 2 --name test1 --limit 512 --skip

排定在Crontab 裡面定時處理,請注意:

  • The –skip parameter disables the initial sync, that normally would be done immediately but can take a while, depending on the size of the backup. The initial sync will be done at the first sync time.

zsync 狀態:

[email protected]:~# pve-zsync list
SOURCE                   NAME           STATE LAST SYNC           TYPE        testing1       ok     2015-05-13_14:44:00 ssh testing1       syncing2015-05-13_14:44:11 ssh  

[email protected]:~# pve-zsync status
SOURCE                   NAME           STATUS        testing1       ok testing1       syncing

差異部分也可以使用zfs 快照傳送,重送方式如下:

zfs send <pool>/[<path>/]vm-<VMID>-disk-<number>@<last_snapshot> | [ssh [email protected]<destination>] zfs receive <pool>/<path>/vm-<VMID>-disk-<number>
Share this Post