Forums / Upgrading from 1.3.x to 1.3.9 / How to "Update" an "Upgraded" Database?

How to "Update" an "Upgraded" Database?

Locked

Views: 1,135

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
9 Sep 2010, 10:17 PM
#1
daltonkost avatar

daltonkost

Zen Follower

Join Date:
Oct 2009
Location:
Smack in the Middle
Posts:
127
Plugin Contributions:
0

How to "Update" an "Upgraded" Database?

Seem to be strugglin' with this one.

I have managed a functional and re-designed "test" site.

Problem is the database I installed to and upgraded is now about 6 weeks old.

I am having trouble trying to get my current 1.3.8a live database into my upgraded 1.3.9f test site. (Which I have done once already)

If significant time has passed since you did your last backup, you may want to repeat the steps in this "Testing" section again, using a fresh backup from your live shop. You don't need to re-upload files again ... simply do the database restore, and run the installer to do the database upgrade again.

Tried this, but something about it I must not get. Errors occur concerning customers, plus it shows I already have an "Upgraded" database to begin with.

What am I missing, or am I not missing anything, it just can't be done this way?

Best Regards

Dalton

Skin that 'un pilgrim, and I'll bring ya' another.
Running 1.3.9h with a few mods here

9 Sep 2010, 10:31 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: How to "Update" an "Upgraded" Database?

Here's the process in a nutshell:

TESTING BEFORE GOING LIVE:
a. put your live site down for maintenance
b. take a backup of your live site database
NOTE: IF YOU'RE JUST TESTING AT THIS POINT, YOU CAN TURN OFF down-for-maintenance so customers can shop. But if you're ready to go live, leave it down for maintenance until the very end of this list, where it says to turn off mainenance mode
b2. (take a backup of your test database too, just in case you need it)
c. import your database backup into your test site
d. run zc_install on the test site and upgrade the database
e. redo any admin settings changes you need to make it work (taking notes so you can do them again on the live site)
f. apply any SQL patches for addons you've added to the test site (taking notes so you can do them again on the live site)
g. test that it's all working as desired, fixing any issues and taking notes so you can do them again on the live site

GOING LIVE:
FIRST: do steps a-g above
h. put the new version's files (not database) onto the live site
i. run zc_install on the live site and upgrade the database
j. redo any admin settings changes you need to make it work
k. apply any SQL patches for addons you've added
l. test that it's all working as desired, fixing any issues
m. take site off of down-for-maintenance

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

9 Sep 2010, 10:58 PM
#3
daltonkost avatar

daltonkost

Zen Follower

Join Date:
Oct 2009
Location:
Smack in the Middle
Posts:
127
Plugin Contributions:
0

Re: How to "Update" an "Upgraded" Database?

First, thank you for such a timely and detailed reply.

One clarification.

c. import your backup into your test site

Are you saying to just ftp the current 1.3.8a files over the top of my 1.3.9f test site?

Note: the test site is relatively re-designed. Hate to have do it all over, but .......

I pretty much get the rest of your instructions. ( I think)

Looking forward to your reply.

Thanks!!

Skin that 'un pilgrim, and I'll bring ya' another.
Running 1.3.9h with a few mods here

9 Sep 2010, 11:08 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: How to "Update" an "Upgraded" Database?

I was referring to "database" backups, since the context of your question was related to backups.

I've updated my post above.

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

9 Sep 2010, 11:54 PM
#5
daltonkost avatar

daltonkost

Zen Follower

Join Date:
Oct 2009
Location:
Smack in the Middle
Posts:
127
Plugin Contributions:
0

Re: How to "Update" an "Upgraded" Database?

Appreciate you holding my hand, as I just don't know enough to distinguish between “literal” and “general” instructions.

This seems pretty clear now, thanks for dumbing it down.

Ever Grateful

Dalton

Skin that 'un pilgrim, and I'll bring ya' another.
Running 1.3.9h with a few mods here

11 Sep 2010, 4:56 PM
#6
daltonkost avatar

daltonkost

Zen Follower

Join Date:
Oct 2009
Location:
Smack in the Middle
Posts:
127
Plugin Contributions:
0

Re: How to "Update" an "Upgraded" Database?

Still no joy here.

Now I'm getting this error

Error
SQL query:

-- -- Dumping data for table zen_address_book -- INSERT INTO zen_address_book (address_book_id, customers_id, entry_gender, entry_company, entry_firstname, entry_lastname, entry_street_address, entry_suburb, entry_postcode, entry_city, entry_state, entry_country_id, entry_zone_id) VALUES (1, 1, 'm', '',

past this are customer names, ect.

MySQL said:

#1062 - Duplicate entry '1' for key 'PRIMARY'

I have even tried this with a new "test site" (Stock install, nothing added)

I started out trying to update and already upgraded database, now it seems I can't upgrade a "new install" database.

Hope someone can point out what's wrong.

Best Regards

Dalton

Skin that 'un pilgrim, and I'll bring ya' another.
Running 1.3.9h with a few mods here

11 Sep 2010, 5:59 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: How to "Update" an "Upgraded" Database?

"Duplicate entry x for key y" errors are a result of you attempting to import data that conflicts with data already in the database table.

So, since that tells me you're importing overtop of existing data, which "step" were you trying to do when you got that error?

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

11 Sep 2010, 6:37 PM
#8
daltonkost avatar

daltonkost

Zen Follower

Join Date:
Oct 2009
Location:
Smack in the Middle
Posts:
127
Plugin Contributions:
0

Re: How to "Update" an "Upgraded" Database?

I have solved this by reading the instructions properly.:oops:

I had not checked :add AUTO_INCREMENT value when exporting my current 1.3.8.a database prior to importing it into my test 1.3.9f database.

What's worse is I bet I made same mistake 10 (or more) times before I found what I had done wrong.

All seems well now. Test site (soon to be live site) has all customers and products as of today.

Thanks For Your Help.

Doofusly Yours

Dalton

Skin that 'un pilgrim, and I'll bring ya' another.
Running 1.3.9h with a few mods here