Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Any way to copy prod database (data) to test database?


cstovin

Recommended Posts

Hi all,

I have a test/development site in a directory off of my root on my live site;

 

I decided to go back and create a seperate database for the test/dev site so I can test later on when things get more complicated without impacting the live site.

 

My question is, I know I can go table by table and copy the DATA from one database table to the test database table.....but is there any way to copy the entire data set from the production database to the test database that I just set up so they are in synch just starting out and so I don't have to move through the config/admin panel one by one and make sure they match?

 

I tried to restore the test/dev database from the prod database and it didn't work....they are not named the same, but in any case, it would not let me restore from the prod version into test/dev.

 

I am sure it is possible to do what I want to do, just don't know how...

Can someone shoot me some suggestions?

 

thank you

 

I can compare admin panel items one by one and make the required changes, but I am sure there is a better, faster way-

Charlene

Link to comment
Share on other sites

You can import your database backup using phpMyAdmin, or whatever your host provides for database access. You will have to make a couple of changes to the Configuration section manually.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

thanks Jim, that is what I thought ....it didn't go so smoothly so I was wondering if it was actually possible to do that....well, now I know it can be done, I guess I'll figure out why it didn't work...

thank you

Link to comment
Share on other sites

You may have problems with timeouts if the database is very large, or if your server is slow. You can chop the backup into pieces and import it that way. Just break between sections or on blank lines. If you don't get any errors, the piece was small enough.

 

Regards

JIm

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Thanks Jim, I need to go back and write down what errors I was having; but it wasn't that - right now my database is pretty much just the original osc structure with a few changes I made to the production site before I made a seperate database for the dev/test site....it might be faster to just check the settings manually, but this shouldn't be too bad to figure out....

Link to comment
Share on other sites

Use the back up functionality in your live shop admin.

 

Edit this file and remove all the lines before the first drop table line.

 

Then you should be able to import it using phpmyadmin on the test/dev db.

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

oh...I wish it had been that easy; i get a lot of timeout errors,

 

My user names and passwords are different, as are the database names; I edited those correctly....I moved the edited backup file to the location in the admin diretory where the backups are located (thinking this is where it will go to restore from)

 

it really can't be this hard....

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...