Database accidently deleted help needed

Started by Johnboy1974, October 17, 2013, 04:12:19 AM

Previous topic - Next topic

Johnboy1974

Hi guys I made a fatal error and accidently deleted MySQL database from my host.
I had not got round to making a backup yet. The host godaddy wants 150 dollars to restore it from their backups.
I have been making monthly backups from inside the smf forum itself in the database section, and I have a couple of zip files on my desktop.
Are these zip files of any use to me at this stage or do I just bite the bullet and give godaddy the money. Thanks in advance.

Cyberhost

Well you open up the ZIP file and you see .sql file, you extract it to desktop. Go to your cpanel, create same named and password database then go phpmyadmin and find your database there and then import the .sql file from desktop and let it download a little bit. And tadaa you're done.

Johnboy1974

Thanks mate I will give this a try and report back.

Johnboy1974

Cyber host unfortunately I can't remember the username and passwords for the database- is it still possible to use these files on a brand new database.

kat

150 bucks, to restore a database?!?!

Ever thought of saying "Screw you!" and getting a decent host? That's daylight robbery. A restore would take them less than five minutes.

Cyberhost

Quote from: Johnboy1974 on October 17, 2013, 05:10:53 AM
Cyber host unfortunately I can't remember the username and passwords for the database- is it still possible to use these files on a brand new database.

It's no problem. You create new database with new name and new password, oor... go to file manager and find settings.php and there should be your database info. If you don't want your old username and password then create new ones and replace the old ones with the new ones on settings.php

Johnboy1974

Quote from: Cyberhost on October 17, 2013, 05:39:56 AM
Quote from: Johnboy1974 on October 17, 2013, 05:10:53 AM
Cyber host unfortunately I can't remember the username and passwords for the database- is it still possible to use these files on a brand new database.

It's no problem. You create new database with new name and new password, oor... go to file manager and find settings.php and there should be your database info. If you don't want your old username and password then create new ones and replace the old ones with the new ones on settings.php

Cyber host thank you for your help. I've done everything you said in your above post. I've retrieved the username and password for the database and set up a new one with the old password and database.
When I try to connect to my forum it says the following.

http://www.glasgowtaxiforum.org

Cyberhost

Quote from: Johnboy1974 on October 17, 2013, 06:24:28 AM
Quote from: Cyberhost on October 17, 2013, 05:39:56 AM
Quote from: Johnboy1974 on October 17, 2013, 05:10:53 AM
Cyber host unfortunately I can't remember the username and passwords for the database- is it still possible to use these files on a brand new database.

It's no problem. You create new database with new name and new password, oor... go to file manager and find settings.php and there should be your database info. If you don't want your old username and password then create new ones and replace the old ones with the new ones on settings.php

Cyber host thank you for your help. I've done everything you said in your above post. I've retrieved the username and password for the database and set up a new one with the old password and database.
When I try to connect to my forum it says the following.

http://www.glasgowtaxiforum.org

Your smf tables prefix was gla1313302592943.smf_, try repair.settings.php

Johnboy1974

Quote from: Cyberhost on October 17, 2013, 06:26:08 AM
Quote from: Johnboy1974 on October 17, 2013, 06:24:28 AM
Quote from: Cyberhost on October 17, 2013, 05:39:56 AM
Quote from: Johnboy1974 on October 17, 2013, 05:10:53 AM
Cyber host unfortunately I can't remember the username and passwords for the database- is it still possible to use these files on a brand new database.

It's no problem. You create new database with new name and new password, oor... go to file manager and find settings.php and there should be your database info. If you don't want your old username and password then create new ones and replace the old ones with the new ones on settings.php

Cyber host thank you for your help. I've done everything you said in your above post. I've retrieved the username and password for the database and set up a new one with the old password and database.
When I try to connect to my forum it says the following.

http://www.glasgowtaxiforum.org

Your smf tables prefix was gla1313302592943.smf_, try repair.settings.php

Sorry mate you're talking to a newbie here can you explain further you're talking to a newbie here and I'm struggling with all of this.


Johnboy1974

Quote from: Cyberhost on October 17, 2013, 06:36:47 AM
Try and run repair_settings.php on your server.


Ok I've downloaded this to my desktop, how do I run it on my server.

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

MrPhil

Quote from: K@ on October 17, 2013, 05:34:49 AM
150 bucks, to restore a database?!?!

Ever thought of saying "Screw you!" and getting a decent host? That's daylight robbery. A restore would take them less than five minutes.

No, it typically takes a lot longer than that. Servers are usually streamed off to tape at a very low level raw disk image. This is done for speed in saving and restoring -- they're not meant to retrieve individual files or databases. For that, they usually have to restore the tape onto a scratch volume and then go fishing for the desired files. It's a fair amount of manual labor, thus the price. $150 seems a little steep, but $50 to $100 is not uncommon. It's also meant to discourage people from relying on server backups for their routine lost files -- they should be backing up themselves. Pay $150 once, and you'll be motivated to learn to do backups and restores yourself. The only time a server backup should need to be accessed is if the disk dies or the server is massively hacked.

Johnboy1974

Guys its all a bit too much for my level of expertise. I contacted the host and paid the money. They have a backup which is from the day before the crash. Only thing its going to take between 1-10 days.
I created a new MySQL database on my host control panel which they are going to utilise. Thanks for all help thus far.

Sir Osis of Liver


In future, use the database backup feature in the GoDaddy control panel.  It saves a .sql file to a backup directory in your GD account (/_db_backups), which you can download to your computer.  The SMF admin backup is unreliable, and should not be used.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

ok. just once more - for the record - the SMF backup is only unreliable in certain circumstances (which usually involve a LARGE forum) - although I agree that the host-side backups should be used most of the time (for speed and resources, if nothing else) - the SMF backup *SHOULD* work for most folks running a non-large forum.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

kat

Quote from: MrPhil on October 17, 2013, 09:16:34 AMNo, it typically takes a lot longer than that. Servers are usually streamed off to tape at a very low level raw disk image. This is done for speed in saving and restoring -- they're not meant to retrieve individual files or databases. For that, they usually have to restore the tape onto a scratch volume and then go fishing for the desired files. It's a fair amount of manual labor, thus the price. $150 seems a little steep, but $50 to $100 is not uncommon. It's also meant to discourage people from relying on server backups for their routine lost files -- they should be backing up themselves. Pay $150 once, and you'll be motivated to learn to do backups and restores yourself. The only time a server backup should need to be accessed is if the disk dies or the server is massively hacked.

Strange. I had my host do a restore, recently. It took less than ten minutes and cost me squat. (My backup was corrupt) :(

Sir Osis of Liver


I've had it fail on very small forums, and on several hosts.  Since there's no way to know if it's going to work on any given forum, it should not be used or recommended here in support until it's fixed.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Well, it's not going to get fixed in 2.0, and it seems to have been removed in 2.1, I think there's your answer.

kat


Kindred

I disagree. Emanuele went to a fair amount of trouble to actually fix it... and then got reamed by some complainers...  so he took it out.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

Quote from: Kindred on October 17, 2013, 05:37:00 PM
... and then got reamed by some complainers... 

That's a bit harsh.  IIRC, some questions were raised as to whether the fix adequately addressed the backup problems, and ema ran out of patience after having put much work into it, and spiked it.

A reliable backup utility would be a very valuable feature, but having had similar problems recently on a couple of hosts with phpmyadmin dumps, I'm wondering if it's even possible.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Arantor

Given the way things were previously, that's an absolutely fair description of what happened.

Johnboy1974

Well guys I'm still waiting, two days now and still the forums down.
I've asked them to restore from 24 hours before I made my fatal error so hopefully everything will be alright as I think I've paid enough money for the service.

Angelina Belle

Were you able to get your SQL database working again?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Johnboy1974

Yes guys I got my database restored and everything up and running. Best of all they had a backup from 6 hours previous to my fatal error. I guess the money was worth it in the end.
I've now made a complete backup of the forum files and database, which I will do once a month.

Angelina Belle

I'm glad it all worked out for you in the end, and that you have a plan in place to protect your forum in the future.  You won't regret it!
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Advertisement: