Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2006
    Posts
    420
    Plugin Contributions
    0

    Default 2 Zen Databases Out of sync - Help

    I have just taken on support for a customer that already had zencart - unfortunately the previous designer / maintainer left them half way through an upgrade.

    So the problem I have now is the live db has all the data from 2006 up to november then from january to present ( when the backup was made ) and the old data on another db the original data with the bit between november and january on !

    Complicated ! Can i do an update / insert on the new db from the old db to populate the orders / customers ? how will I deal with duplicate order id's customers etc . it it too difficult to do ?

    Is it going to be a manual job to sort the data externally then import it back in with new IDs?

    Thanks for any help on this . I think it needs a Mysql wizard to help me !
    Various Zen cart sites !

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: 2 Zen Databases Out of sync - Help

    First I would create another install of Zen Cart on the host in a folder and with a new DB - using DB data from backups of the other 2 DB's select one - drop the tables in the scratch install and import the previous DB and rerun zc_install of required due to version differences..

    On the other DB that contains data that you do not have for the scratch install. Select the tables with data that you require i.e. all customer, all order etc.
    and export - then do not select add drop table, check Add IF NOT EXISTS, Add AUTO_INCREMENT value, Enclose table and field names with backquotes, Complete inserts, Extended inserts save as a file

    First take a backup of the scratch DB then import the other missing data into the scratch DB and see if any errors are generated
    If there are errors you can then look at the missing data file and carefully correct them.

    Restore the scratch DB from the backup - try adding the edited missing data again and if you caught all the errors this should then be ok

    Once OK you can use this to update the store DB in the normal fashion
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2006
    Posts
    420
    Plugin Contributions
    0

    Default Re: 2 Zen Databases Out of sync - Help

    Cheers Kobra , will give that a go. Kinda makes sense. will let you know how I get on ! Cheers again .
    Various Zen cart sites !

 

 

Similar Threads

  1. Multiple SQL Databases with Zen Cart?
    By Ogran in forum General Questions
    Replies: 3
    Last Post: 1 Feb 2011, 01:24 PM
  2. Autoincrement product_IDs out of sync
    By datagnostics in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 22 Jul 2009, 08:06 PM
  3. zenAdminID out of sync
    By Vladimir7 in forum Basic Configuration
    Replies: 6
    Last Post: 6 Apr 2009, 09:54 PM
  4. Old Databases in new zen cart problems?
    By phillpal in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 20 Apr 2008, 05:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR