|
|
#1 (permalink) |
|
Third Plateau
Comfy Contributor
Joined in Apr 2004
Lives in East Hanover, New Jersey
Hosted on Nifty
272 posts
Gave thanks: 0
Thanked 0 times
|
Gah! I've accidentally deleted a whole MySQL database. I was all careless in CPanel because I expected it to ask me before doing anything.
Why does it ask the user before deleting an e-mail address, put files in a trash can, but doesn't ask when deleting a WHOLE DATABASE?! Luckily, I can restore most of the data by going through the server logs. Geeze, that delete button that doesn't prompt is easier to accidentaly hit than typing DELETE from database;. |
|
|
|
|
|
#3 (permalink) |
|
Third Plateau
Comfy Contributor
Joined in Apr 2004
Lives in East Hanover, New Jersey
Hosted on Nifty
272 posts
Gave thanks: 0
Thanked 0 times
|
*whew* I just spent an hour writing a PHP script to parse the log file and re-add it to the database. All is good except for a minor glitch that can be fixed tomorrow. :grrr:
|
|
|
|
|
|
#4 (permalink) |
|
L'Awesome Advocate
Super #1
Joined in May 2004
Lives in .au
Hosted on Mango
2,423 posts
Gave thanks: 1
Thanked 5 times
|
I don't know how to do that
I just deleted the script and installed it again =\
__________________
When I get sad, I stop being sad, and be AWESOME instead. True story.
|
|
|
|
|
|
#7 (permalink) |
|
Surpass Fan
Super #1
Joined in Dec 2003
Lives in NJ
5,057 posts
Gave thanks: 0
Thanked 4 times
|
accidents do happen. sorry to hear about that one. ive wiped stuff before too.
for future reference... with 2 click its possible to generate a mysqldump of the entire contents of a db - translated into CREATE TABLE and INSERT INTO statements that PHPmyadmin can execute, or that the cPanel restore feature can load. Cpanel > backup > Backup db name. |
|
|
|
|
|
#8 (permalink) |
|
Third Plateau
Comfy Contributor
Joined in Apr 2004
Lives in East Hanover, New Jersey
Hosted on Nifty
272 posts
Gave thanks: 0
Thanked 0 times
|
I was only able to recreate the database since it only inserted data in the query string. I'm guessing you weren't that lucky and had some forum or blog accidentally deleted.
Yeah, I know about backup features. I found a backup from 5 days before the accident happened and built onto it from there. I'm thinking about writing some cron script that uses mysqldump on my workstation to make backups. |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|