Can't restore a Local site

I’ve had to migrate to a new system and am trying to restore backups of my existing Local site folders.

I have followed the steps listed here: How can I restore a site from a Local site folder? but, at the point that I run the SSH step in point 5, I receive the following error message:

** (myloader:923): CRITICAL **: the specified directory is not a mydumper backup

All of the requisite .sql files are present in the app/sql folder.

Any help would be greatly appreciated, thanks.

Hi @mrsippy,

If there are individual SQL files for each table you can add an empty file named metadata (no extension) if it’s missing.

Then, you can try running step #5 again.

Hi Clay,

There are indeed individual SQL files for each table, and the metadata file is already present.

Can you please screenshot your Terminal after running the command? I’d like to see the entire context if possible.


Here’s the Terminal:

And a Finder view:

1 Like

I’ve actually managed to get recent mySQL dumps of the databases that I needed, so I don’t actually need to restore any sites in this manner anymore (I’m zipping wp-content and database.sql up and dropping them into Local), but going forward it would be nice to know that this works in case I can’t get mySQL dumps next time.

Thanks for the screenshots!

I’d go ahead and try deleting metadata and then re-adding a blank metadata file.

OK I’ve tried that, unfortunately it didn’t make any difference.

Wow, interesting!

Can you try running ls -la /app/sql in the site container and then provide the output?

Hi Clay, I’ve shut down for the day, will do this tomorrow.

1 Like


When I delete the newly created site folder as per step 3 in the above linked article, and rename the backup site folder to match what the deleted site folder was named, the container loses track of the app folder:

I thought’d I’d stop the site at this point, then start it again, and then attempt to run:

myloader -p root -d /app/sql --overwrite-tables --database local

This was the result:

There are a number of lines output below what you can see there reporting that tables do not exist, but I imagine this is due to the errors you can see output above.

It’s clear what the problem is above, the odd thing is that Local created these sql files so should be familiar with the collation, no?

Aha, great finds!

If you create the new site with MySQL 5.6 that error will go away when you import it.

Great, thanks Clay. As I mentioned previously I have managed to get dumps of the DBs so no longer have any need to do this, but it’s good to know for future reference.

I guess you should add “stop site/start site” as a step to this page: How can I restore a site from a Local site folder?

Thanks for your help!

1 Like

hello, I have tried all of these suggestions but I still cannot restore my local websites. I have spent so many hours creating these websites, can someone please help me?
I have returned several errors each time to run the command you say to run:
-p: command not found
** (myloader:293): CRITICAL **: Error restoring loca.wp_users from file local.wp_users.sql: Duplicate entry ‘1’ for key ‘PRIMARY’ ---- 9 lines of this etc etc.

Perhaps someone can tell me how I can get the database into one file so that I can use the drag and drop method?


Having similar issue to JPS and what was discussed at the start of this thread. Im stuck and could really use some help getting my site back up. please help

Hey Clay, I’m having the same issues, and haven’t had any luck – All SQL files are present, metadata file present, metadata file deleted and recreated, and new sites are being installed as MySQL 5.6, but still getting the Critical Errors:

I’ve lost all access to my dev sites because of the errors since the most recent update, could really use your help in importing them!

Thanks for your time,


How do I fix newbie and I’m not understanding this post about it. I renamed file, seem like it was going to work but then a duplicate window for changing or giving permissions on my MAC pops up and denies .

Here is the error message I’m getting as well for the site please help I have a number of sites developed that I need to access like today and I’m so frustrated no clue.

Error message:
Error: Command failed: /Applications/ --default-character-set=utf8 -A --skip-column-names -e SET names ‘utf8’; use local; source /Users/tyronnechisholm/Local Sites/elderberrydev/app/sql/local-schema-create.sql;

ERROR 1007 (HY000) at line 1 in file: ‘/Users/tyronnechisholm/Local Sites/elderberrydev/app/sql/local-schema-create.sql’: Can’t create database ‘local’; database exists
How do I correct?