Zen Cart Logo
Forums / General Questions / Accidently DELETED database table???? HELP

Accidently DELETED database table???? HELP

Locked

Views: 1,063

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
23 May 2009, 2:57 AM
#1
staceyx avatar

staceyx

New Zenner

Join Date:
May 2009
Posts:
28
Plugin Contributions:
0

Accidently DELETED database table???? HELP

Ok, so I did the worst thing possible, I wanted to delete redeemed gift cert info, and deleted the WHOLE coupons_gv_customers table from my DATABASE (php my admin) - Is there ANY way to recover this ONE table? If not, what do I do... and no I don't have a database backup
ugh.... thank you!

23 May 2009, 3:44 AM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Accidently DELETED database table???? HELP

Contact your Hoster and see if they can provide you with a recent backup.

23 May 2009, 12:24 PM
#3
tech_e avatar

tech_e

Zen Follower

Join Date:
Jan 2007
Posts:
159
Plugin Contributions:
0

Re: Accidently DELETED database table???? HELP

People always learn the hard way when it comes to backups. :(

You should be backing up the database yourself on a regular basis. This means at least once per week. If you have a busy store, it should be at least once per day.

23 May 2009, 2:37 PM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Accidently DELETED database table???? HELP

Stand up everyone who always had a backup on every file they created...

... My point is... we have all learned the hard way - me included!

I now pay my hosting service a tiny $2 per month for their excellent daily backup service. Never had to use it, but for this price it's great insurance and I sleep easier at night.

23 May 2009, 2:41 PM
#5
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Accidently DELETED database table???? HELP

Stacey... As you're a new zenner, I assume there's no vital data in that table yet... or am I wrong?

If you just need to restore the table, then the following should do it:

DROP TABLE IF EXISTS coupon_gv_customer;
CREATE TABLE coupon_gv_customer (
  customer_id int(5) NOT NULL default '0',
  amount decimal(15,4) NOT NULL default '0.0000',
  PRIMARY KEY  (customer_id)
) TYPE=MyISAM;
24 May 2009, 5:31 AM
#6
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Accidently DELETED database table???? HELP

fairestcape:

I now pay my hosting service a tiny $2 per month for their excellent daily backup service. Never had to use it, but for this price it's great insurance and I sleep easier at night.

Although you've never had to use the backups, I hope you do test them on a regular basis. If not, you have a false sense of security. I've lost count on the number of times I've found that so called 'backups' are either incomplete, impossible to access, or simply not occurring where and when expected.

On a more personal note, I would never put 100% confidence in any backups performed by a hosting company, The only time I feel 'safe' in this regard is if I also have my own backups on a local machine. Admittedly my local backups are performed far less often than the server backups (once a month rather than daily), but I wouldn't feel comfortable without it.

Obviously I too have only learned the the importance of backups the hard way, and as you said/implied, this is the only way any of us really learn the importance of it. Sadly, I've also learned the importance of testing backups, and having backups in more than one location the hard way, which is why I'm posting this response to your excellent advise.

Cheers
Rod