Zen Cart Logo
Forums / General Questions / Restored MAMP folder - Can I get my database back?

Restored MAMP folder - Can I get my database back?

Locked

Views: 11,165

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
8 Jul 2008, 6:47 PM
#1
tokkelosh avatar

tokkelosh

New Zenner

Join Date:
Oct 2007
Posts:
9
Plugin Contributions:
0

Restored MAMP folder - Can I get my database back?

Firstly, I have to admit that I am not very familiar with DB applications.

Here's my problem (any suggestions would be very much appreciated):

I had a virtual store running on my Mac. All was hunky-dory with 600+ items in the store and almost ready to upload to my host. I made a daily copy of my entire MAMP folder (XAMPP equivalent) which includes the Zencart installation. I stupidly installed WordPress into the htdocs folder - things went wrong and I ended up with an unrecoverable mess.

Copying the entire back-up MAMP folder into the same location gets me sort of back to where I was as far as the layout and customized themes goes, but the DB with all my categories and items are missing. Is there any way of importing/linking the old DB into the 'new' store ? I've tried the Importing from phpMyAdmin but cannot seem to get anywhere. Attached is a snapshot of the files in the DB folder.

Is there something simple I'm missing or have I lost everything ?

9 Jul 2008, 5:54 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Restored MAMP folder - Can I get my database back?

If you open your browser to "localhost/MAMP" can you access phpMyAdmin and access your data?

Your MAMP controls might be on "localhost:8888/MAMP" depending on how you've set it up.

9 Jul 2008, 7:27 PM
#3
tokkelosh avatar

tokkelosh

New Zenner

Join Date:
Oct 2007
Posts:
9
Plugin Contributions:
0

Re: Restored MAMP folder - Can I get my database back?

Thanks for your help DrByte.

I can access phpMyAdmin. I reinstalled zencart using the same settings as the original install (db name - zencart and the same password) and now have a zencart (95) db.

Would I be correct in assuming that the file ibdata1 (10MB) is where the original data is stored ? If so, is there any way of importing it ?

Mmmh, is there an 'Idiot' Smilie for me to use ?

10 Jul 2008, 4:14 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Restored MAMP folder - Can I get my database back?

I have no idea what "ibdata1" is.
If you originally had your data in a database named "zencart", then that's where your data would have been. If you've created a new database named "zencart" and/or run a new install using that database name, then you've likley overwritten the contents of that database and would need to restore from backup again.

Rather than doing a "folder" backup to backup database content, you should use phpMyAdmin to do a proper database "export" so that you can move your data around between servers if necessary, etc. Related FAQ: https://www.zen-cart.com/tutorials/index.php?article=103

10 Jul 2008, 5:44 PM
#5
tokkelosh avatar

tokkelosh

New Zenner

Join Date:
Oct 2007
Posts:
9
Plugin Contributions:
0

Re: Restored MAMP folder - Can I get my database back?

The only file that appears in the zencart db folder is 'db.opt' which is only 4k in size. Looks like I have two choices:

  1. Learn SQL
  2. Start drinking

It's all gone isn't it ?

13 Jul 2008, 12:14 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Restored MAMP folder - Can I get my database back?

It would seem that if your MySQL folder, which at one point contained database table files for your offline Zen Cart data, is empty, that ... well ... that data is not on your computer anymore.

Whether it's available in your backups is the remaining question.

You might find more specific support for restoring your MySQL data using raw operating system files by looking on the MySQL website and/or the MAMP support community.

13 Jul 2008, 5:12 AM
#7
tokkelosh avatar

tokkelosh

New Zenner

Join Date:
Oct 2007
Posts:
9
Plugin Contributions:
0

Re: Restored MAMP folder - Can I get my database back?

The backup folder is also empty - I have no idea why the contents weren't copied from the original. Permissions perhaps ?

I've accepted my mistake and have started from scratch. Unfortunately I've had to learn the hard way.

Thanks for the input and help.