Craft CMS 3 Content Mover
Depending on the level of "corruption", if the 3.1 Control Panel is still accessible and loading, you can use something like FeedMe to export the content you're looking for into a new Craft 3 install.