# List the snapshots on the local machine.
local_list=$(mktemp /tmp/replicate.XXXXXX)
$zfs list -H -t snapshot |
# List the snapshots on the local machine.
local_list=$(mktemp /tmp/replicate.XXXXXX)
$zfs list -H -t snapshot |
- grep ^backups/${remote_fs}@ |
- awk '{gsub(/^backups./,"",$1); print$1}' > $local_list
+ grep ^${local_pool}/${remote_fs}@ |
+ awk '{gsub(/^${local_pool}./,"",$1); print$1}' > $local_list
common=$(diff -u $remote_list $local_list | grep '^ ' | tail -n 1)
ssh $remote $zfs send -R -I${common/*@/@} $latest |
common=$(diff -u $remote_list $local_list | grep '^ ' | tail -n 1)
ssh $remote $zfs send -R -I${common/*@/@} $latest |