add_sendok_message

This commit is contained in:
Milan Meduna 2019-03-30 18:42:34 +01:00
parent debda3aa43
commit 24cfaec0a9

View file

@ -31,10 +31,10 @@ backup_snap=$(echo "$backups_server_zfs_snapshots" | grep "$backup_server_datase
if [ -z "$backup_snap" ]
then
echo "Snapshot on backup server not found, sending "$dataset"@"$source_snap" to server "$backup_server" "$backup_server_dataset"/"$dataset_clean""
zfs send -c "$dataset"@"$source_snap" | pv | ssh "$backup_server" -p "$backup_server_port" zfs recv "$backup_server_dataset"/"$dataset_clean"
zfs send -c "$dataset"@"$source_snap" | pv | ssh "$backup_server" -p "$backup_server_port" zfs recv "$backup_server_dataset"/"$dataset_clean" && echo "Send OK"
else
echo "Snapshot on backup server found, sending incremental from "$dataset"@"$backup_snap" to "$dataset"@"$source_snap" to server "$backup_server" "$backup_server_dataset"/"$dataset_clean""
zfs send -ci "$dataset"@"$backup_snap" "$dataset"@"$source_snap" | pv | ssh "$backup_server" -p "$backup_server_port" zfs recv "$backup_server_dataset"/"$dataset_clean" -F
zfs send -ci "$dataset"@"$backup_snap" "$dataset"@"$source_snap" | pv | ssh "$backup_server" -p "$backup_server_port" zfs recv "$backup_server_dataset"/"$dataset_clean" -F && echo "Send OK"
fi
done
del_snaps_block