ssh mode: log file details of received snapshots

Instead of just 10+ log entries saying receiving a snapshot, give at least some
details on which file is in flight.
This commit is contained in:
Kevin McCormick 2017-07-28 11:02:01 -07:00
parent aafb241393
commit 7e0a2a583e

View File

@ -202,6 +202,7 @@ elif $fromssh ; then
log "receiving incremental snapshot from $src to $dest" log "receiving incremental snapshot from $src to $dest"
#ZFS "$srchost" send $send_opts -R -I "$last" "$cur" | ZFS "$desthost" receive $recv_opts -Fue "$destfs" || die $? "zfs incremental send failed" #ZFS "$srchost" send $send_opts -R -I "$last" "$cur" | ZFS "$desthost" receive $recv_opts -Fue "$destfs" || die $? "zfs incremental send failed"
for file in $(ssh "$srchost" zfsfind | sort) ; do for file in $(ssh "$srchost" zfsfind | sort) ; do
log "receiving $file from $host"
if [[ $file =~ \.gpg$ ]] ; then if [[ $file =~ \.gpg$ ]] ; then
ssh "$srchost" zfsget "$file" | gpg | ZFS "$desthost" receive $recv_opts -Fue "$dest" \ ssh "$srchost" zfsget "$file" | gpg | ZFS "$desthost" receive $recv_opts -Fue "$dest" \
&& ssh "$srchost" rm "$file" && ssh "$srchost" rm "$file"