Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29
  1. #21
    Join Date
    Sep 2008
    Location
    Toronto, Ontario, Canada
    Posts
    469
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    Ok - the problem is sort of fixed - am still doing some work on it and will update you all later - my issue was a really strange one and it's a hell of a long post to explain it.

    Will post the answer as soon as I finish a couple of things.

    Thanks to everyone for their ideas

  2. #22
    Join Date
    Jan 2008
    Posts
    31
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    Hello,
    I read your posts and it appears that I have a similar issue.
    I use Cpanel to perform home directory backups. After doing backups many times i finally had a reason to perform restore. When I did so, it was not clear if it was working as no error message appeared. Anyway, after trying many times (and tried an unzipped version once also) I decided to ask my hosting guy for help.

    They eventually came back with the reply that I would need administrator access for restore to work!!

    I still have not got a reply to the suggestion of giving me such access level.

    Still, I thought that once I had Cpanel access that I could do a restore any time i needed, and I thought, as the site owner that i would have more than enough access privileges.

    Does anyone know if the administrator response is correct or better again... how do I get restore to work.

  3. #23
    Join Date
    Sep 2008
    Location
    Toronto, Ontario, Canada
    Posts
    469
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    I'm currently at work and will try to post my solution tonight at home - it's the wierdest thing I've ever seen

    You might be having the same issue - it's a real long answer and I'll have to be very clear about the details.

  4. #24
    Join Date
    Jan 2008
    Posts
    31
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    I will await the information with anticipation

  5. #25
    Join Date
    Sep 2008
    Location
    Toronto, Ontario, Canada
    Posts
    469
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    Ok,

    Where exactly do I start?

    I guess I’ll start here: Zen Cart Installation

    There are two primary ways to do it 1- Fantastico, 2 – Manual – (I’ll skip this part for the moment).

    My web host is generally pretty good and I have no major issues with them – they provide a service – my sight runs well and I usually never have to talk to them – everything’s good.

    Now onto Zen Cart Installation – and my really weird configuration – maybe yours is the same?

    One of the services my web hosts provides is an up-to-date C Panel – all of the software programs that you can get to added onto your site easily are offered and they get updated fair rapidly so that there can be some frequent changes there – i.e. Version 1, 2, 3, etc. Most of these are offered and installed via the Fantastico link and some are directly via the C Panel itself.

    [A] In my case when I originally installed Zencart – I did it the Fantastico route and installed 1.3.8a – un-patched security version – the host now offers 1.3.8a[patched version]. I installed the patches myself before I did the database backup. This may have something to do with the issue – I’m still looking into this part of it. If I find out that has something to do with it- I’ll let you know hence the [A] at the start of this paragraph.

    With me so far? Good.

    Time to distinguish 2 things – Zen Cart uses a SQL database and in my case I can install it in two different ways.

    1. Fantastico 2.
    Manual via C Panel
    (more later)

    I’ll stick with the Fantastico at the moment.

    Before I do let’s talk about how I, you, we, others may have our sites set up – it may help.

    Let’s say you have a site called Tony.com. (You may need to talk to your host about this to see how you’re set up).

    Tony.com has a file structure of

    Public_html
    Your website folders are here – I’ll call a folder “TonyHome” in this example.
    Your website files are here also – I’ll call this one example2.html
    Your website files might be in the folders above example1.html – this file will be inside the folder above.

    Thus Tony.com if you looked at the file structure you would see:

    Public_html
    TonyHome Folder
    Example1.html
    Example2.html file < note the differences in the above – for those of you who are new 1 is inside the folder

    If you were to look at the file paths they would look like this:

    Tony.com>Public_html>TonyHome>Example1.html << for the file inside the folder
    Tony.com>Public_html> Example2.html << if you were just going for a file not inside a folder

    With me so far? Good.

    Ok, you’ve logged into CPanel and Pressed the Fantastico button (again, you’re following the way I did it so that you can see what I did to compare how you’ve done it) – you see under the e-commerce section “Zencart”

    You click it and a window opens

    Install onTony.com < already filled in but dropdown there if you have more than 1 domain
    Install in Directory – blank < this is a blank field and has to be filled in by you – in this case the “directory” mean the folder seen in the example above – we will call your store folder “myzencart”
    User Name – blank < this is a blank field and has to be filled in by you – pick a name
    User Password – blank < this is a blank field and has to be filled in by you – make a password
    Admin email – blank < this is a blank field and has to be filled in by you – put in a email that you can be contacted at easily – passwords reminder – etc.

    When done press the install button – after this next step you will get a “finish” button

    When the install button was pressed this is what happens.

    Zen Cart – whichever version it is – will have:

    1 SQL database set up and in your public_html folder a folder called “myzencart”

    Press the finish button.

    Now here’s where part of the fun (?) begins – and this is where you may have to talk to your provider to confirm:
    Go back to CPanel scroll up or down the page you should see the following:

    MySql Databases, MySql Database Wizard, MyPhpAdmin, Remote Php WhachaMaCalliT < don’t worry about the remote thing not covered here - just pay attention to the blue.

    Explanations

    MySql Databases, < Once your Database is created you will see a reference to it here – this is also where you can grant user’s access and set up your own access/priveledges too.

    MySql Database Wizard, - used in the manual process of setting up your Zencart – more later

    MyPhpAdmin, - the nuts and bolts of your cart

    Two steps to verify next:

    Click MySql DatabasesCreate your user ID / and password and assign it to your “myzencart” then assign the priveledges that you want – click ok/done/finish – whatever you’re offered.

    If ok - you should see your user id beside the database – just make sure that you are assigned to it.

    Click MyPhpAdmin next

    On the left hand menu you should see your database link or a drop down window to select it – now in case you’re wondering what it is – it might be named “myzencart (95)”, _zc1 (95) or whatever you’ve named your store – the key part is look for the (95) this will most likely be your Zen Cart – I say most likely because most of us only have one – power users might have forty databases or something. For our example it will be _zc1 (95)

    _zc1 (95) < what is it? – and this is where you may have to talk to your provider to confirm
    Tony.com is your domain but you might not be able to clearly see how your databases are set up in terms of the file structure on your site.

    The _ in front of the zc1 even if it’s not displayed on your MyPhpAdmin might mean Tony.com_zc1 (95) – it’s not clear to you but tony might just be there.

    The zc1 is the name of your database so if you decided for whatever reason to have more that one store it would look like:
    _zc3 (95)
    _zc3 (95)
    _zc3 (95)

    Or
    _tom (95)
    _and (95)
    _harry (95) if you named them this way.

    The (95) are the number of tables in the database – remember this part it’s important.

    Now assuming you have done it – the installation - right you’re your store should be seen at tony.com/myzencart or whatever you called yours. – do the security patches/admin change/load products, etc etc on your site. Once you have your store done (I'm talking about the first time here above) it's now the time to do a backup – there are probably 2-3 ways you can do it

    1. CPanel backups options – do it here – talk to your host if needed.
    2. MyPhPAdmin – follow the instructions found in the forums or the book pages 364 to 366 – check for updates
    3. Download the entire store via FTP then Zip it
    4. Do ALL of the above at least once – for a worst case scenario – this is best just after you have set up everything and have it look all nice and pretty and have polulated it with products done security patches, etc etc.

    Ok for me I updated the entire store except # 1 above. and I picked the Gzip Option.

    Then saved it to my local – for this example we’ll call it “back-up-1.Zip”

    Here’s what I did when I needed to do the restore:

    Since my shop was completely F’d dude to my own stupidity – I reloaded a brancd new store and went to MyPhpAdmin Panel – clicked on the Import tab – Since I choose to override the tables – my existing tables would be re-wriiten on the upload.

    I selected the zip file – “back-up-1.Zip” and pressed go and got this message:

    You attempted to load file with unsupported compression (application/zip). Either support for it is not implemented or disabled by your configuration.

    I therefore had to unzip it on my machine.

    I then repeated - MyPhpAdmin Panel>Import Tab>selected the zip file from my local – “back-up-1.Zip” and pressed “go” again

    The _zc1 (95) now showed _zc1 (190) – WTF??? Ok BIG HINT HERE it didn’t work and you have just doubled up the files in your database!!

    Since _zc1 (190) had now doubled in size, it was clear that I had to do it another way.


    This step WILL ERASE EVERYTHING ON YOUR DATABASE – BE WARNED!!!

    We are going to first wipe out all the existing tables in the database before we re-populate it with your backed up SQL.


    (1) Go to phpMyAdmin and click on the database _zc1 (95) that was created by Fantastico. You should see a listing of all 95 tables.

    (2) Scroll down that page and click the "Check All" hyperlink to highlight all the tables.

    (3) In the drop-down box next to the "Check All" hyperlink, select the "Drop" option. You will be prompted with a page asking you to confirm whether you want to drop the tables.

    (4) Click on the "Yes" button to drop all the tables. << See the warning imediately above!!

    (5) On the left panel of the phpMyAdmin screen, you will notice that there are no more tables in your database _zc1

    (6) Now to re-populate the database _zc1 click on the "Import tab"

    From your local. – select “back-up-1.Zip” If your backed up ZIP file fails, un-zip it on your local repeat the process and select the text file instead.

    (7) If step (6) above works, then just visit your store front and see if it now contains all the products that you had previously in your old database. You may not have the pictures yet as they could be in your old PC.

    Ok Now let me tell you what happened to me:

    When I did it – everything was messed up – the formatting was all screwed up so….

    1. M\ake sure:

    /home/Tony/public_html/myzencart/includes/templates/classic exits and if not you will have to load a copy in from somewhere – most likely your local.

    Secondly, make sure that you have switched the template to Classic in your [mystore] Admin Console.

    2. Make sure: - admins are set the right way – default is shown below.

    /home Tony/public_html/myzencart/admin/includes/configure.php
    /home/ Tony/public_html/myzencart/includes/configure.php
    /home Tony/public_html/myzencart/admin/includes/configure.php
    /home Tony/public_html/myzencart/includes/configure.php

    Note: re Passwords – hope you remember them J

    After repeated attemps at fixing the formatting issue – everything was still screwed up so a thought occurred to me to load a brand new store into the database.

    Then I selected to drop all of the tables EXCEPT – zen_Layout_Boxes

    Reloaded – got same format issue

    Dumped all – reloaded brand new store again

    Then I selected to drop all of the tables EXCEPT – zen_Layout_Boxes and zen_Confirguration
    Reloaded – got same format issue

    Dumped all again and reloaded the backup

    This time when it reloaded – EVERYTHING was in it’s RIGHT place.

    It’s possible that something wasn’t loading right – because using the method above – even though I loaded the backup,

    the first time:

    – zen_Layout_Boxes – I only had 15 files

    the second time:

    – zen_Layout_Boxes and zen_Confirguration – I only had 37 files – so I knew something was definitely going on

    After the last dump – I reloaded everything again and it worked.

    If you can get it to work using the stuff I did above congrats – you may also need to – after you get it working right:

    Fix Cache Key
    http://www.zen-cart.com/index.php?ma...products_id=82

    These 2 articles may be helpful to understand the process as well.
    - https://www.zen-cart.com/tutorials/index.php?article=99
    - https://www.zen-cart.com/tutorials/i...hp?article=100

    In summary, here’s a review of my situation:

    - Initially, the problem was restoring the database. There were several issues involved.
    - One of those issues was the host seemingly having a problem with their database names which was confusing.
    - Another issue was the fact that I was still unable to import into an existing database.

    In my case:

    All ZC tables in an existing Zen Cart database will need to be dropped before the import script will run.

    [B] - Another issue was that the backup needed to be first unzipped the script before the import will succeed. The zipped file import does not work for your host's phpMyAdmin configuration or it could be something else I couldn’t determine what it was stopping the zipped version from being loaded – if I find out I will let you know.

    - The final issue was after everything got set up, the template won't loading. - I don’t know how I got the thing to work using the steps above but it did. I think that my situation was the weirdest of them all. Never seen it happen before – will probably never see it happen again.

    You could also try to reload your database table by table using the following:

    To backup table-by-table, you will need to manually edit the uncompressed .sql file. If you're not familiar with that, it's best not to do it. Alternatively, create 2 x new databases (e.g. database "A" and database "B"). Restore 1 x database (e.g. database "A"), then export each table individually from database "A" to database "B". It's a tedious process though.

    As for comparing the changes on the host, you can use the program Winmerge (which is recommended in the book's appendix and is free) to do that. Just make sure you have the copies of the file from the host and those that you currently have on the same PC when doing your comparison for speed reasons.

    I also received the following from a good friend:

    Your situation regarding the database restoration is really weird.

    I've never seen or encountered anything like it so I'm in no position to comment.

    Just hope all these dumping/restoring of the database helps you gain confidence in the process. <<< Oh Boy I am a database dumping expert now!!!

    Just be very, very careful that you never overwrite a 'live' database that you have not backed up.

    I've seen and heard enough of those stories to tell you it’s a very unpleasant and pretty helpless situation.


    My thanks to all in this entire process – I hope that this long post helps you out and that I have made everything clear in a truly weird situation

  6. #26
    Join Date
    May 2009
    Posts
    4
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    I'm also trying to restore a backup file using PhPmyAdmin. Receiving the following 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', '', [...]

    MySQL said: Documentation
    #1062 - Duplicate entry '1' for key 1

    If I delete the address book info from the sql file, it gives me the same error for the next section. Help!!

  7. #27
    Join Date
    Sep 2008
    Location
    Toronto, Ontario, Canada
    Posts
    469
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    Yes I got his one too - I'll revisit when I get home.

    Here's a suggestion - maybe good advice?

    Make yourself a brand new store - call iy "mydaabase-testing" or something - follow the dumping instructions above on the new store - who cares if it doesn't work - it's not a real store.

    Dump them all, reload all see if you get the error - if you do dump all - except 1 - see it you getting the correct amount (95) maybe 96.

    Keep fiddiling with the test database - Keeps your main store untouched until you figure out what's going on.

  8. #28
    Join Date
    Sep 2008
    Location
    Toronto, Ontario, Canada
    Posts
    469
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    Ok Looked around a bit on the web - didn't get to my store last night and can't tonight - earliest for a ZC perspective might be Wed - if lucky - or Thursday

    But this might help:

    http://www.theadminzone.com/forums/s...ad.php?t=32498

    or maybe better yet - I went to the MySQL Site did a search on #1062 - Duplicate entry - got this go to date

    http://forums.mysql.com/read.php?20,...655#msg-284655

    go to 10/05/2009 - post

    maybe by reading the thread you can get a head start on me or someone else here can explain the message to us.

  9. #29
    Join Date
    Sep 2008
    Location
    Toronto, Ontario, Canada
    Posts
    469
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    lol - IF THIS POST HELPED ANYONE ELSE OUT LET ME KNOW

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Problem restoring database backup
    By cinbou in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 29 Oct 2010, 12:57 AM
  2. 1.3.9d problems after restoring site from backup
    By countingsheep in forum Upgrading from 1.3.x to 1.3.9
    Replies: 39
    Last Post: 3 Jul 2010, 03:57 AM
  3. Restoring the backup
    By elorajade in forum Installing on a Windows Server
    Replies: 3
    Last Post: 17 Sep 2009, 08:40 AM
  4. Restoring From BackUp
    By QuickInks in forum General Questions
    Replies: 1
    Last Post: 12 Feb 2009, 10:31 PM
  5. restoring database from backup
    By dni in forum General Questions
    Replies: 1
    Last Post: 5 Nov 2007, 03:34 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