How to recover from a deleted _spark_metadata folder in Spark Structured Streaming

Warning: The described procedures have been tested on Spark 2.4.3 and 3.0.1, but otherwise not on all...
Tags: spark