I'm confused. The 'rm -rf' lines should just remove empty mountpoints. And the mke2fs lines should be avoidable by using the "Do not format" option. If these aren't working right, I need to know.
There have been some old discussions about this. Threre are some addtional tweaks you might need to make with the --delete portions of the rsync lines. See what dzz had to say about it. I don't remember what he was doing with it.
Edit: Wow. We've obviously fallen off the google search grid. A search for the words rsync and delete only brings up three hits. If I add the word format, there are no hits. That's for five years of discussion about three tools that use rsync and format. Is the internet dying?
If I can remember what the thread was about, maybe I can find it. It was at least a year ago, more likely two years ago. The Do not format option appeared in refractainstaller 9.0.9,, around the end of 2013 or early in 2014.
Try this one -
new-versions-of-installer-and-snapshot-9-1-x-for-sid-t383-40.html#p3788 or (I searched for 'filter lost+found').