Oh so sorry to hear, there are complex ways to recover in the dev environment, you could go fishing through logs/development.log but I do not think we store history in our actual DB.
The best and safest approach it to lean on version control for all your themes and components, be sure to have each of them in version control.
How did you end up going?