Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    110
    Plugin Contributions
    2

    Default I just royally screwed myself, SQL Please Help

    Is there anyway of undoing an SQL that I just ran?

    I was having issues with a plugin and I tried to run an SQL patch without knowing what I am doing (first clue). When I tried to edit or delete a customer I was getting a HTML 500 error. So I tried to just "reset" my store by running mysql_zencart.sql, which just deleted my whole store, products, customers, orders, etc, etc.

    PLEASE, is there anyway of fixing this?????

  2. #2
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,732
    Plugin Contributions
    27

    Default Re: I just royally screwed myself, SQL Please Help

    Yes, using the .sql backup you made/exported in phpMYadmin (or similar SQL program) BEFORE you attempted installing any upgrades to your site - just import the backup and your database will be back to normal. Site files the same, republish the site files you backed up prior to the updates.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

  3. #3
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    110
    Plugin Contributions
    2

    Default Re: I just royally screwed myself, SQL Please Help

    Hi Twitch,

    Ummm, I don't have an SQL program... Is that the ONLY way?

  4. #4
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: I just royally screwed myself, SQL Please Help

    Quote Originally Posted by jwlamb View Post
    Hi Twitch,

    Ummm, I don't have an SQL program... Is that the ONLY way?
    If don't have a recent backup of your database then the headline of this thread rings absolutely true - sorry. If that is the case then contact your host and ask if they are doing daily backups - if yes ask them to restore the lot.

    A good host does daily backups......

  5. #5
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: I just royally screwed myself, SQL Please Help

    Quote Originally Posted by jwlamb View Post
    Is there anyway of undoing an SQL that I just ran?
    Nope.. If you have a backup of the store BEFORE you ran the SQL script you could restore from your backup..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  6. #6
    Join Date
    Oct 2006
    Posts
    60
    Plugin Contributions
    0

    Default Re: I just royally screwed myself, SQL Please Help

    Talk to your webhost. Maybe they can provide you with a backup. Most decent host perform regular daily backups.

    Good luck.

  7. #7
    Join Date
    Jan 2014
    Location
    Arizona
    Posts
    110
    Plugin Contributions
    2

    Default Re: I just royally screwed myself, SQL Please Help

    Thank you to everyone who suggested going to my hosting provider, which is GoDaddy BTW. They do not do daily backups, but they did have a backup from two days ago, so I only lost data for one customer and one order. Luckily I had the needed info in my email, so I was able to recover from this mess.

    If anyone else finds themselves in the same situation with GoDaddy, they charge $150 for "emergency backups". Luckily I was able to get them to waive the fee for my first time screw-up. Now I know there is more to backing up your store than just the files on the ftp. Lessons learned the hard way are remembered the most.

  8. #8
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: I just royally screwed myself, SQL Please Help

    Quote Originally Posted by jwlamb View Post
    ......my hosting provider, which is GoDaddy BTW. They do not do daily backups......
    That in itself would prevent me from hosting with GD - pay cheap get cheap.

    In addition to my host making daily backups, I also run a cron tab on all of my sites which backs up DB's daily to a folder outside the ZC environment. Another cron tab deletes any backups older than 14 or 30 days which keeps space usage to a limit.

    Better safe than sorry.....

  9. #9
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: I just royally screwed myself, SQL Please Help

    Quote Originally Posted by jwlamb View Post
    Thank you to everyone who suggested going to my hosting provider, which is GoDaddy BTW. They do not do daily backups, but they did have a backup from two days ago, so I only lost data for one customer and one order. Luckily I had the needed info in my email, so I was able to recover from this mess.

    If anyone else finds themselves in the same situation with GoDaddy, they charge $150 for "emergency backups". Luckily I was able to get them to waive the fee for my first time screw-up. Now I know there is more to backing up your store than just the files on the ftp. Lessons learned the hard way are remembered the most.
    The bigger lesson is that you need to backup your whole store before installing anything so that you can rollback if you need to.. Even better is that you should have a development version of your site which is a "clone" of the live site so you can test before making changes to your live store..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  10. #10
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: I just royally screwed myself, SQL Please Help

    Quote Originally Posted by DivaVocals View Post
    The bigger lesson is that you need to backup your whole store before installing anything so that you can rollback if you need to.. Even better is that you should have a development version of your site which is a "clone" of the live site so you can test before making changes to your live store..
    Yep, that should be mandatory!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v139h Ticket printing - nearly there. Just need a little SQL help please
    By rustwood in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 6 Jan 2014, 11:20 PM
  2. My menu screwed up, please help, thanks
    By mdivk in forum Addon Templates
    Replies: 1
    Last Post: 21 Dec 2011, 05:20 AM
  3. I locked myself out of admin/can't change password HELP PLEASE!
    By sweetcheeks in forum General Questions
    Replies: 4
    Last Post: 11 Mar 2009, 04:06 AM
  4. I screwed up, please help!!!
    By Childproof in forum Basic Configuration
    Replies: 5
    Last Post: 26 Jan 2009, 02:59 PM
  5. I screwed my store - I need help please!
    By maclancer in forum General Questions
    Replies: 0
    Last Post: 10 Jul 2007, 06:20 PM

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