Jump to content

Database Update - How to still have latest data from PROD?


Recommended Posts

Hello.

I have upgraded a prestashop system from version 1.4.x to latest 1.6.

Now this process had a lot of impacts on the codes, modules and our custom themes..etc

 

So we have been working on resolving all the issues for a week.

 

Now we are left with a problem: The database back from PROD which was upgraded, now suffers from being "data outdated" as compared to the one on PROD right now.

What I mean is that during those 1weeks, the PROD database has been having new singups and new orders..etc.

 

QUESTION:

I want to have a suggestion on how I could update my "upgraded pre-prod database" for it to still have the latest transactions of PROD?

If I just do an import of the orders and clients from a date range and dump it, would this be the best option?

 

Thanks!

//Khayrattee

Link to comment
Share on other sites

This is what I do with my clients when I do an upgrade like that. 

 

First I upgrade the shop in a production environment to get everything compatible and ready. This part you have done it sounds like. 

 

Once everything is ready to launch from the dev site, the data is out of sync. Usually I request people not to add products during that time, it just makes the whole process harder and more time consuming. 

 

Ok, to sync the data up this is what I do on launch night, I generally launch things in the middle of the night, because traffic is a lot lower. 

 

I download the whole current live site locally to my computer, from there I put it in XAMPP so I can bring it up locally. On the server I go into the database and dump it into a gzip file and also put the shop in maintenance mode, that part is important. Then I load the database into phpmyadmin locally and bring the site up and live on local host. From there I do the upgrade again, but I choose to back nothing up so it will process a lot faster. Once it is done, I export all of the customer and order related tables from the database into a single gzip file. (If you have added new products, you will have to export those as well) Once I have the gzip file I can go to the database on the dev server and drop all of the tables I just exported from the local copy. Then I import the file I exported locally. Once that is done, I give a quick check in the back and front office to make sure things are working correctly, then I go into apache and change the site root to now point at the dev directory and bring the site up. It might sound time consuming, but I can do it with about 10-20 minutes of down time usually. 

 

Be sure to back your dev database up before dropping the tables as well, you might drop one you need and have to restore.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...