Forums / General Questions / Restoring part of an .sql file

Restoring part of an .sql file

Locked

Views: 790

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
15 Oct 2007, 3:03 AM
#1
dionysian avatar

dionysian

New Zenner

Join Date:
Mar 2007
Posts:
25
Plugin Contributions:
0

Restoring part of an .sql file

I have an .sql file, the backup of my old ZC site made before switching hosts. I have reinstalled ZC on the new host but would like to restore the category names, descriptions, and images, from my .sql backup. Is there anyway I can do this?

My host is running cPanel 11, I have phpMyAdmin access, but can't find anything to import only partially. Thanks.

15 Oct 2007, 3:36 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Restoring part of an .sql file

Is there a reason that you only want a partial?

Normally the full DB is restored and if there is a version difference then the zc_install is re-run and the upgrade DB only is selected

Zen-Venom Get Bitten

15 Oct 2007, 12:38 PM
#3
dionysian avatar

dionysian

New Zenner

Join Date:
Mar 2007
Posts:
25
Plugin Contributions:
0

Re: Restoring part of an .sql file

Hi, the reason I only want a partial is that on the old store, I only did work on the categories, subcats, and their descriptions and images. I don't want to lose this, but I also don't want to import that entire DB because I've changed a lot of settings on the new store and don't want to lose those changes.

Dumb situation I got myself in. :laugh:

15 Oct 2007, 9:17 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Restoring part of an .sql file

Really depends because many tables are cross indexed for speed and depending on what modules you might have added and what DB entries they affect will this be a success

Zen-Venom Get Bitten

16 Oct 2007, 3:02 AM
#5
dionysian avatar

dionysian

New Zenner

Join Date:
Mar 2007
Posts:
25
Plugin Contributions:
0

Re: Restoring part of an .sql file

So basically I'm screwed? :)

16 Oct 2007, 3:12 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: Restoring part of an .sql file

If you know which tables to restore data from, and don't mind dumping all related data from your "new" database, you can delete the new data, and bring the data from the old one into the new one.

It's not exactly a task intended for those not well-versed in database management.

The list of tables storing certain types of data can be found here:
http://www.zen-cart.com/wiki/index.php/Developers_-_Database_Schema

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.