DBs from Time Machine backup?

All MAMP discussions around troubleshooting and anything related to MAMP. Be as detailed as possible here when posting an issue.
Post Reply
tonyrambler
Posts: 2
Joined: Sun Jul 03, 2022 6:30 pm

DBs from Time Machine backup?

Post by tonyrambler »

Hi all,
running MAMP on MacOS. Accidentally corrupted the DB for a Wordpress site I'm developing. I've been trying all day to bring it back and searching all advice, with no joy. I have a complete Time Machine backup to work from.

The database files are a series of .frm and .ibd files, which I have restored, and also restored the ibdata file.

Can I make a .sql file from these original files and reimport it somehow? Nothing I've tried seems to work, such as directly dropping in the original .frm and .ibd etc files into the MAMP structure.

Any help appreciated!
Tony
mampsupportmod
Site Admin
Posts: 136
Joined: Wed Jan 20, 2021 3:06 am

Re: DBs from Time Machine backup?

Post by mampsupportmod »

See viewtopic.php?t=132

Basically, if you are restoring from a Time Machine backup that was taken when MySQL DB was live (MySQL was not stopped during backup), restoring won't work because it backed up files in past/future. The link above should fix corruption, but depending on DB sizes, it take sometime. When I had this happen it took my DB's of around 1 gig to rebuild almost a day on a higher end machine. Behavior made most of my sites inaccesible, but slowly MySQL fixed the broken corruption before all sites/DB's worked.

MAMP Snapshots in MAMP PRO are best for now or stop MAMP Pro (Apache/MySQL/etc) and perform a Time Machine backup. I'm hoping MAMP introduces a better auto-recovery method to MySQL doesn't have to be stopped to get full backups.

Good luck
MAMP Support Forums is an unofficial support forum covering MAMP & MAMP Pro solution stacks.
tonyrambler
Posts: 2
Joined: Sun Jul 03, 2022 6:30 pm

Re: DBs from Time Machine backup?

Post by tonyrambler »

Thanks mampsupportmod. I saw that thread and hoped it wasn't the one I needed!

Well, I just bit the bullet yesterday and rebuilt the site-so-far. I'm now past the previous build stage so it's all good.

Thank you for the advice about stopping the MAMP servers to backup, that's great. I'm doing that now. I'll also do exports from PHPmyAdmin.
Post Reply