~woffs/zerbst

b2d434c2c17e3871622b8faefc5058c510c096b7 — Frank Doepper 11 months ago b744ce9 master
sleep before rsync -i if under load
2 files changed, 7 insertions(+), 1 deletions(-)

M zerbst-suck-zfssendrecv
M zerbst-zfssnap2filelist
M zerbst-suck-zfssendrecv => zerbst-suck-zfssendrecv +1 -1
@@ 40,7 40,7 @@ do
    ;;
    *\ *) # srczfs dstzfs
      [ "$host" ] || continue
      if [ "$host" = localhost ]; then remote=eval; else remote="ssh -n $host"; fi
      if [ "$host" = localhost ]; then remote="eval"; else remote="ssh -n $host"; fi
      # shellcheck disable=SC2086
      set $line
      echo "$host $line snapshot"

M zerbst-zfssnap2filelist => zerbst-zfssnap2filelist +6 -0
@@ 42,6 42,12 @@ zfs list -H -d1 -rtsnap -oname -sname "$zfs" | grep -E '@....-..-..' | \

      newdir=$(zfs get -Ho value mountpoint "${new%@*}")
      newsnap="$newdir/.zfs/snapshot/${new#*@}"

      # warten, bis suckdisk halbwegs fertig ist, weil sonst alles sehr sehr langsam wird
      while [ "$(cut -d\  -f1 /proc/loadavg | tr -d .)" -ge 900 ]; do
        sleep 4m
      done

      rsync -8JOanix --existing --numeric-ids --delete --force \
        "$newsnap"/ "$oldsnap"/ | \
        grep -aE '^>f|^\*deleting' | cut -c13- | while read -r j