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

    Default Re: Restoring to a backup version question.

    Just thought I would throw this in here as an extra question to tie it all together into one spot.

    When doing the backup/restore thing - if you have an ssl cert on your store does that also get restored or do you have to redo it?

    Thanks.

  2. #12
    Join Date
    Oct 2006
    Posts
    624
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    So now that its confirmed that your database actually contains existing tables, you need to make sure that the existing tables are removed (i.e. DROPPING tables in SQL speak) while restoring your backup or else you will face the duplicate keys problem.

    The process of removing tables and re-creating the new tables is usually automatic if you have the DROP TABLE statement in your backed up SQL file. For example, look for the following statement in your backed up SQL file and let us know whether it exists.

    Code:
    DROP TABLE IF EXISTS `zen_address_book`;
    Regarding the SSL cert, it is set up by your host so there's nothing to restore or backup. What you need to make sure is that the 2 x configure.php files are backed up and restored properly as those two files control whether your store actually makes use of the SSL capabilities provided by the SSL cert.
    Goh Koon Hoek, author of "e-Start Your Web Store with Zen Cart".
    Printed book: www.lulu.com/content/10576284
    Electronic book and Errata: www.cucumbermedia.com/store

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

    Default Re: Restoring to a backup version question.

    THANKS!!!

    You know I really appreciate this - it's a really good learning experience - perhaps others will benefit from ready this too!

    So now for the next question:

    How do I "look for the following statement in your backed up SQL file and let us know whether it exists"?

    Do I open the thing in notepad or dreamweaver or something?

    Thanks.

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

    Default Re: Restoring to a backup version question.

    ok - unzipped it -opend notepad - did cntl+f to open find - copied pasted the code text provided and found nothing.

  5. #15
    Join Date
    Oct 2006
    Posts
    624
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    Ok, that means that you did not check the "Add DROP TABLE" option if you did the backup via phpMyAdmin. In short, your backed up SQL script cannot be used to override a database with any existing Zen Cart tables.

    It's not a problem for your case. One of the ways to restore your backup is as follows:

    1. Go to your host's control panel and create a new database.
    2. Now in your host's phpMyAdmin, populate the new database with your previously backed up SQL script.
    3. If everything is ok, then you can change your 2 x configure.php files to point to this new database. You can try visiting your store front or admin to confirm that the changes were made successfully. You made need to make some changes later but we'll worry about later.
    4. If something is wrong, then post your errors here again.
    Goh Koon Hoek, author of "e-Start Your Web Store with Zen Cart".
    Printed book: www.lulu.com/content/10576284
    Electronic book and Errata: www.cucumbermedia.com/store

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

    Default Re: Restoring to a backup version question.

    Good news - sort of

    step 1 = ok
    step 2 = ok - I have a restored database (95)
    Step 3 - can't find what you are looking for

    https://www.jecphotography.com/mystore

    Step 4 = as above

    I do have a secuty question now though and I may need to talk to my host about this but here you go:

    re step 1

    If I install via fantasico - it puts it into a folder called X (whatever I name it) it then looks like this on myphoadmin

    _ZenCart (95)

    doing it your way it now looks like this:

    tony_Zencart (95)
    and there's no folder anywhere to speak of in my ftp lists so I can't modify my files unless I'm doing something wrong.

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

    Default Re: Restoring to a backup version question.

    I tried the fantastico one too - found out that I can delete everying(tables) there and then upload the unzipped sql. but everything looked really wierd.

    I am SOOOOOO GLAD I am doing this BEFORE I launch instead of after I launched and got hacked or something - this way it's a very good lesson un an unstressed way instead of after a launch and you REALLY Stressed!

  8. #18
    Join Date
    Oct 2006
    Posts
    624
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    Step 3 refers to the 2 x configure.php files that is part of the file structure in Zen Cart installation on your host.

    For example, if you have Zen Cart installed in a sub-directory with a name "mystore" and your admin folder is "admin", then your 2 x configure.php files may be found in a similar directory structure:

    • /home/username/public_html/mystore/includes/configure.php
    • /home/username/public_html/mystore/admin/includes/configure.php

    Once you've located your 2 x configure.php files, look for the following code and change them to reflect the details of the new database you've populated.

    PHP Code:
    // define our database connection
      
    define('DB_TYPE''mysql');
      
    define('DB_PREFIX''zen_');
      
    define('DB_SERVER''localhost');
      
    define('DB_SERVER_USERNAME''xxxxxx');
      
    define('DB_SERVER_PASSWORD''xxxxxxxx');
      
    define('DB_DATABASE''xxxxxxx'); 
    After that, go to your store front or admin and refresh your page and you should have all the information from your restored database instead of the old database.

    Note that changes should be applied to BOTH configure.php files and not just one of them.
    Goh Koon Hoek, author of "e-Start Your Web Store with Zen Cart".
    Printed book: www.lulu.com/content/10576284
    Electronic book and Errata: www.cucumbermedia.com/store

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

    Default Re: Restoring to a backup version question.

    Quote Originally Posted by canopy View Post
    Step 3 refers to the 2 x configure.php files that is part of the file structure in Zen Cart installation on your host.
    Yep got that part

    Quote Originally Posted by canopy View Post
    For example, if you have Zen Cart installed in a sub-directory with a name "mystore" and your admin folder is "admin", then your 2 x configure.php files may be found in a similar directory structure:

    • /home/username/public_html/mystore/includes/configure.php
    • /home/username/public_html/mystore/admin/includes/configure.php
    Right this the part I don't get. I'm assuming that I'm a sub because I see _ZC1 (95) on MpPhpAdmin - well I actually see 2

    _ZC1 (95) is the one via fantastico the one you had me do is
    tony_mystore (95).

    but here's the thing via the fantastico - all files are in a folder - very easy to find via my FTP program.

    the tony_mystore (95) The files can't be found anywhere using my FTP program but the database was restored.

    Where do I look to find the files?

    I'm also a little frustrated by this whole thing - I followed the backup procedures from the book and I'm at a loss as to why this isn't working as well as it should. Perhaps I'm an idiot and did it wrong or perhaps it's because we now on 1.3.8a and I've backed everything up wrong to start with because there have ben changes in the backup procedures.

    Another question - If for example, I had my store _ZC (95) and I could see my store folder and all the files in it via my FTP program, If I deleted the contents of the data base (all that table stuff went to zero) and then reloaded the SQL (this seemed to have worked when I tried it - just as a test to help my learning experience - the tables went back to 95) would this work too or should I still consider those files in my store folder to be corrupt?

    Anyways, because my store wasn't lauched my frustration level is such that I feel like doing a complete rebuild - I have the local files that were tweaked so part of it would be easy but I would still be in the same spot if this happened if this happened when my store goes live.

    Any other advice? LOL besides - don't do e-commerce hahahahaha
    Last edited by janissaire; 27 Jan 2010 at 07:09 PM. Reason: added in the LOL comment

  10. #20
    Join Date
    Oct 2006
    Posts
    624
    Plugin Contributions
    0

    Default Re: Restoring to a backup version question.

    I'm afraid I'm confused about your situation based on your description. Here's what I gather, do correct me if I'm wrong.

    It seems like you are confusing your database files (which you think exist based on what you see in phpMyAdmin) with your Zen Cart files.

    When you use a database on your host, you will not have any access to the database files unlike the case if you were to run a local copy of the database on your PC. You can only manipulate the databases via an interface like phpMyAdmin on your host.

    The _ZC1(95) and the tony_mystore(95) which you see in your phpMyAdmin interface indicates the databases that you've set up in your hosting account. You won't find any files on your server related to them because they are controlled by your host. What you are limited to doing with those databases are to create/delete them, create/delete database users and set permissions on them, or import/export the data within those databases.

    What Zen Cart does is to use the contents of the 2 x configure.php files to point to the database that it should use when running your store. It does this by using the code I pointed out in my previous post.

    In short, what you should do is not to look for any database files but to change the settings in the 2 x configure.php files which are presently pointing to the old database (i.e. _ZC1) to point to the new database (i.e. tony_mystore) instead.

    Do remember that your new database need to be assigned a database user with the correct permissions to access your new database as well. Turn to your host control panel for instructions if you are not sure about this.

    Finally, you're no idiot and the procedures in the book on backing up a database still stands even if its for ZC 1.3.8a. However, I would need to update it to better reflect differences in hosting environments. Sorry about that.
    Goh Koon Hoek, author of "e-Start Your Web Store with Zen Cart".
    Printed book: www.lulu.com/content/10576284
    Electronic book and Errata: www.cucumbermedia.com/store

 

 
Page 2 of 3 FirstFirst 123 LastLast

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