Restore Site wipes the database

I am using Windows 10 and updated to the latest version of Local this morning. I have a lot of sites with a custom setup. When I clicked Restore Site, which I had to do because there was no other way of starting the site, the entire database had been wiped to how it is during a fresh install. It’s a good job I had a copy backed up somewhere else!

This worked fine on another install however. FYI

Hey @patrick_wc

The “Restore Site” button will attempt to re-import the SQL files that are in the sql folder into the site container.

One reason that the site might be reverting back to a fresh install is that the most recent data from the database wasn’t written out to the SQL files.

This is only done when a site is stopped. I usually recommend stopping your sites at the end of the day so that they get written to SQL files and can then be backed up with something like Time Machine.

One other good practice that I do is to right-click on the site and export it after certain milestones, that way it’s pretty easy to restore from a complete zip archive.

Hope that helps clarify things. If you have any other questions, just let me know!

– Ben

1 Like

Hi @ben.turner

That must have been what happened, cheers!