Once you get everything re-installed, create an Image Backup to an external device. That way, the next time something like this happens,
you can simply go back to the last Image you created.
You know what they say about an ounce of prevention…