WIP: ZFS backup implementation
This commit is contained in:
13
roles/common/templates/zfs-send-daily
Normal file
13
roles/common/templates/zfs-send-daily
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
destination_connection=ssh root@truenas.lab.home
|
||||
destination_dataset=Mass-Storage-New/Backup
|
||||
|
||||
# Wait for zfs-auto-snapshot
|
||||
sleep 1
|
||||
|
||||
dataset="dock/volumes"
|
||||
|
||||
latest_snap=$(zfs list -t snap -Hp -o name -S creation $dataset | head -1 | tr -d '\n')
|
||||
|
||||
zfs send $latest_snap | $destination_connection zfs recv -o encry
|
||||
Reference in New Issue
Block a user