Forums / General Questions / Importing only certain tables of a backed up database

Importing only certain tables of a backed up database

Locked

Started by candleman on 24 Oct 2008, 12:18 PM · Views: 2,713

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
24 Oct 2008, 12:18 PM
#1
candleman avatar

candleman

Zen Follower

Join Date:
May 2008
Posts:
183
Plugin Contributions:
0

Importing only certain tables of a backed up database

I am wondering is it possible to only import certain tables from a previously backed up database?
If it is, can someone explain how, or point me in the right direction please?
I cannot find anything from searching, except a complete backup.

https://www.candlewithcare.co.uk
Luxury Scented
Candles at great prices!

24 Oct 2008, 12:56 PM
#2
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,324
Plugin Contributions:
40

Re: Importing only certain tables of a backed up database

CandleMan:

I am wondering is it possible to only import certain tables from a previously backed up database?
If it is, can someone explain how, or point me in the right direction please?
I cannot find anything from searching, except a complete backup.

If you have done this https://www.zen-cart.com/tutorials/index.php?article=103 to create a dump, then in phpMyadmin you can drop just the tables from your dump in that you wish.

You will also find this helpful https://www.zen-cart.com/tutorials/index.php?article=100

~Melanie

24 Oct 2008, 1:02 PM
#3
candleman avatar

candleman

Zen Follower

Join Date:
May 2008
Posts:
183
Plugin Contributions:
0

Re: Importing only certain tables of a backed up database

So if I dump the tables I want to overwrite, then when I import, it will only overwrite the "Dumped" tables yes?

https://www.candlewithcare.co.uk
Luxury Scented
Candles at great prices!

24 Oct 2008, 1:06 PM
#4
mprough avatar

mprough

Totally Zenned

Join Date:
Nov 2007
Location:
Woodbine, Georgia, United States
Posts:
4,324
Plugin Contributions:
40

Re: Importing only certain tables of a backed up database

You will open the dump (backup) you created in a text editor like PSPad and the copy the tables a few at a time and paste them in the SQL window in phpMyAdmin to overwrite.

~Melanie

24 Oct 2008, 4:13 PM
#5
candleman avatar

candleman

Zen Follower

Join Date:
May 2008
Posts:
183
Plugin Contributions:
0

Re: Importing only certain tables of a backed up database

Is there a list anywhere or maybe instructions so I can import certain things.

Ie, to import existing customers and their orders which tables do I import?

To import existing categories and products which tables do I import?

https://www.candlewithcare.co.uk
Luxury Scented
Candles at great prices!

25 Oct 2008, 6:24 AM
#6
awhfy99 avatar

awhfy99

Zen Follower

Join Date:
Feb 2007
Location:
Burleson. Texas
Posts:
196
Plugin Contributions:
0

Re: Importing only certain tables of a backed up database

mprough:

You will open the dump (backup) you created in a text editor like PSPad and the copy the tables a few at a time and paste them in the SQL window in phpMyAdmin to overwrite.

~Melanie

Is there a simple way to convert that data to a patch that can be inserted via the admin? Like maybe remove any db name reference? I was thinking of trying that scenerio of adding users from one to another db. My guess would be the zen_customer_info, the zen_customer and maybe the zen_address_book as well might do it. I have yet to try this on a test site but will try it soon. Any suggestions or hints are appreciated.

Dennis
www.stampdays.com
Over 80,000 stamps and still growing!

25 Oct 2008, 6:30 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: Importing only certain tables of a backed up database

.
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.

25 Oct 2008, 2:15 PM
#8
awhfy99 avatar

awhfy99

Zen Follower

Join Date:
Feb 2007
Location:
Burleson. Texas
Posts:
196
Plugin Contributions:
0

Re: Importing only certain tables of a backed up database

DrByte:

Database Table reference: http://www.zen-cart.com/wiki/index.php/Developers_-_Database_Schema#Table_List_Ordered_by_Data

Thanks, that confirmed my quess. I tried it and it worked great I copied two users from one test site to the second one. Everything AOK, including the address books. On a live site I would need to add the 4th insert as well, don't want to omit any group assignments.

Dennis
www.stampdays.com
Over 80,000 stamps and still growing!