diff --git a/src/datastore_mad/remotes/rsync/backup_cancel b/src/datastore_mad/remotes/rsync/backup_cancel index c9da117c4f..0251070ba7 100755 --- a/src/datastore_mad/remotes/rsync/backup_cancel +++ b/src/datastore_mad/remotes/rsync/backup_cancel @@ -68,7 +68,8 @@ begin script = <<~EOS set -x -e -o pipefail; shopt -qs failglob (ps --no-headers -o pid,cmd -C ruby \ - | awk '$0 ~ "backup .*#{vm_uuid}" { print $1 } END { print "\\0" }' || :) \\ + | awk '$0 !~ "prebackup(_live)? .*#{vm_uuid} " { print }' \ + | awk '$0 ~ "backup .*#{vm_uuid} " { print $1 } END { print "\\0" }' || :) \\ | (read -d '' PIDS [[ -n "$PIDS" ]] || exit 0 # empty [[ -z "${PIDS//[[:space:][:digit:]]/}" ]] || exit -1 # !integers