Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Backing up / Restore not working

Backing up / Restore not working

Locked

Views: 1,813

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
7 Aug 2009, 9:50 PM
#1
jstewart30 avatar

jstewart30

New Zenner

Join Date:
Aug 2009
Posts:
2
Plugin Contributions:
0

Backing up / Restore not working

I am in the process of moving to a new hosting provider and am trying to get everything switched over. Part of my problem may be that my old provider is using older versions of phpMyAdmin (2.2.6) and mySQL (3.23.58) than my new hosting company (2.11.9.5 and 5.0.81 community). Part of why I'm switching, though...

Anyway, I'm using phpMyAdmin to export the database. I'm selecting all tables, doing "structure and data", checking "add drop table", "complete inserts", "extended inserts", and saving the file unzipped. That seems to work fine.

On my new hosting company, I used Fantastico De Luxe to do a new Zen Cart installation. It created the database for me during that process. One difference I notice is that all the tables it created have a "zen_" prefix (e.g, "zen_address_book"), which my original database doesn't have. I don't know if that's an issue or not.

So I go into phpMyAdmin on the new server, select the newly created ZC database, and I choose "Import". I choose my exported file, leave character set as "utf8", check (or uncheck, doesn't matter) "allow interrupt", choose "SQL" as the format, and I've tried both "None" for the compatibility mode as well as "MYSQL323" (since my original is a 3.23 database). No matter what I set there, I get the same response: "Import has been successfully finished, 0 queries executed". And there's nothing in the new database...it's just not importing anything.

I'm on a Mac, I don't know if that matters. The .sql file that's being created in the export is a text file that looks correct if I open it up in a text editor...it's 588k (there's not much in the database) and has data in there.

Any help would be greatly appreciated. I wish there was another way to copy the database over, but I don't see one (original host is on Plesk, new one is cPanel).

Thanks,
Joseph

7 Aug 2009, 10:06 PM
#2
recentcoin avatar

recentcoin

New Zenner

Join Date:
Jun 2007
Posts:
36
Plugin Contributions:
0

Re: Backing up / Restore not working

Go to your old hosting provider and try downloading the SQL export as a zip file.

Then try uploading that (without unzipping) to your new hosting provider.

Your ultimate problem is the 0 queries executed. That means it didn't do anything. You may also want to check "drop if exists" in the export options.

7 Aug 2009, 10:42 PM
#3
jstewart30 avatar

jstewart30

New Zenner

Join Date:
Aug 2009
Posts:
2
Plugin Contributions:
0

Re: Backing up / Restore not working

Thank you for the suggestions. I tried both ZIP and GZIP, with no change (still 0 queries executed). I don't see a "drop if exists" export option...I've attached a screenshot of the export options I see in this phpMyAdmin version.

Is it correct that I should be Importing into a fresh ZC database? Or should I be going into a completely empty mySQL database? I think I've tried both, with no improvement, but I just want to make sure I'm approaching this from the right angle at least. And should it matter if the tables' names are different ("zen_tablename" versus just "tablename")? I tried renaming the first table from "zen_address_book" to just "address_book" to see if it would at least put data in that table, but it didn't.

Thanks.

8 Aug 2009, 5:58 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Backing up / Restore not working

jstewart30:

"Import has been successfully finished, 0 queries executed".
That almost always means the file you're importing is corrupted/damaged in some way.
It could be a result of any number of problems:

  • file is not readable
  • when the webserver uploads it and attempts to parse it, the content isn't readable as SQL code
  • invalid syntax used in the imported file, including the use of obsolete SQL statements or comments
  • bad line-endings due to mismatches in handling when transferring over repeated FTP connections

I suspect it's related to syntax problems between your old version of MySQL and the new one. The old one likely exported with "TYPE=MyISAM" tags on all the files, but MySQL 5 requires that to read "ENGINE=MyISAM".

I've sometimes seen conflicts with the use of '--' for comments in the file, and needed to change all those to '##' instead. That was a painful and tedious task, since a simple search/replace isn't easy unless your editor can limit the changes to only the cases where the '--' starts at the beginning of a new line, and not somewhere else in the actual data.

8 Aug 2009, 5:59 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Backing up / Restore not working

jstewart30:

And should it matter if the tables' names are different ("zen_tablename" versus just "tablename")?
You want to keep the table names the same between sites ... otherwise you'll have trouble finding the actual data. You can rename them all manually, but that is best done AFTER importing, if you feel you must bother with it.

You should read the FAQ article on how to move between hosts: https://www.zen-cart.com/tutorials/index.php?article=100