Go Back   Web Hosting Forums > Webhosting Forums > Shared Hosting

Shared Hosting Shared webhosting forum for Linux and Windows OS - reviews, recommendations, and experiences.

Reply
 
Thread Tools Search this Thread
  #1 (permalink)  
Old 01-08-2006, 11:09 PM
triumph's Avatar
Senior Member
 
Join Date: May 2006
Posts: 123
Default Host Nightmare

One of my hosts had a major server outage on my server that lasted almost all of yesterday. Basically from about 4:00am until about 2:00am or so this morning.

Today everything is back, except one site the database is corrupt from backup. It is only showing 15 tables out of the 35 it should have. They seem stumped. Unfortunately I have run this site for a year and it is very low maintenance. I can not find a database backup anywhere for it.

So I am not sure what I will do. I have asked them to look for an older backup, but we shall see. This is a cheap re-seller account and you do get what you pay for, but it does not make the experience any better.

I don't care that much about losing the data, but I don't want to have to spend the several hours it will take me to start the site over from basically scratch.
Reply With Quote
  #2 (permalink)  
Old 02-08-2006, 07:19 AM
Super Moderator
 
Join Date: Mar 2006
Posts: 454
Default Re: Host Nightmare

If it was a cheap account, then you're very lucky that they were able to restore anything

You should always maintain a seperate backup of your data regardless of what your provider is doing as even the best providers can have problems.
__________________
Alex Monaghan - Monaghan Consultants Ltd
Web hosting, ADSL & more
Custom Web hosting (UK or USA)
Mobile Ringtones, Games & more
Reply With Quote
  #3 (permalink)  
Old 02-08-2006, 03:05 PM
TWD_Tony's Avatar
Super Moderator
 
Join Date: Mar 2006
Location: Manchester, UK
Posts: 230
Default Re: Host Nightmare

You will be hard pressed to find a host that guaratees 100% backup availability... without spending a small fortune on hosting.
Most host's will advertise that they backup daily or nightly etc but in the small print of the T's & C's you will certainly find a get out clause like "backups are for account restoration purposes only" or "backups are for our own use and are not 100% guaranteed"... This is bacause once a host advertises that they keep reliable backups - they are LEGALLY accountable for the data.
As you have found out - there are a lot of things that can (and do) go wrong with remote backups, even RAID configurations can get corrupted.

Any host that provides a backup service without a get-out clause are leaving themselves wide open to be sued in the event of data loss.
__________________
Contact me for a great deal on UK or USA based hosting, multi-domain hosting and fully managed dedicated servers.
Reply With Quote
  #4 (permalink)  
Old 04-08-2006, 09:35 AM
brian's Avatar
Administrator
 
Join Date: Apr 2006
Posts: 229
Default Re: Host Nightmare

Sorry to hear about your experience, triumph - it's always worth asking for another database backup to be attempted, though.
Reply With Quote
  #5 (permalink)  
Old 07-08-2006, 10:50 PM
Member
 
Join Date: May 2006
Posts: 97
Default Re: Host Nightmare

Urgh. Sorry to hear about such a sucky experience. Good luck getting things back up and running :/
Reply With Quote
  #6 (permalink)  
Old 08-08-2006, 10:13 PM
triumph's Avatar
Senior Member
 
Join Date: May 2006
Posts: 123
Default Re: Host Nightmare

Brian,

i did go through it several times trying to get another backup, or get one of mine. I normally do backups, at irregular intervals, but did not have one.

I am trying to come up with a good way to automate my backups, but right now I have about 30 sites, and I have found nothing that really does what I want.

Anyone have any recommendations for automating the database backup process? That is the biggest key for me. The other stuff I backup when i change it.
Reply With Quote
  #7 (permalink)  
Old 09-08-2006, 12:18 PM
brian's Avatar
Administrator
 
Join Date: Apr 2006
Posts: 229
Default Re: Host Nightmare

Sounds like a Cron job may be useful - I'll look into providing more detailed info, unless Tony or Monaghan beat me to it.
Reply With Quote
  #8 (permalink)  
Old 09-08-2006, 04:12 PM
TWD_Tony's Avatar
Super Moderator
 
Join Date: Mar 2006
Location: Manchester, UK
Posts: 230
Default Re: Host Nightmare

You can either create a SQL database backup via a cron job - or you can use a small peice of php to do it for you...

Create a new file in notepad and copy and paste the following into it:

<?php
#Create a dump
$cmd = `/usr/local/nf/bin/mysqldump -u Username -pPassword databaseID > dbBackupFile.sql`;
?>


Now save the file as a .php file (backupdb.php for example) and upload it to your www folder.
You can now call this script via a cron job as often as you wish - thi script will create a backup in your www directory.
Don't forget to change the Username, Password and dabaseID for your details

I also know of a script that will create a sql backup and email it you as an attachment if anyone is interested?

__________________
Contact me for a great deal on UK or USA based hosting, multi-domain hosting and fully managed dedicated servers.
Reply With Quote
  #9 (permalink)  
Old 10-08-2006, 08:02 PM
brian's Avatar
Administrator
 
Join Date: Apr 2006
Posts: 229
Default Re: Host Nightmare

Dumb question - what's involved in setting up the Cron job with the php dump script?
Reply With Quote
  #10 (permalink)  
Old 10-08-2006, 08:40 PM
TWD_Tony's Avatar
Super Moderator
 
Join Date: Mar 2006
Location: Manchester, UK
Posts: 230
Default Re: Host Nightmare

Sorry... To run a php script that hasn't got executable permissions (chmod 644) you need to setup the following in cron:

30 0 * * * /usr/local/bin/php -q /myscript.php

This will run the script myscript.php every night at 00:30

This presumes the script is in your web root - otherwise you will need to change the /myscript.php to /directory/myscript.php
__________________
Contact me for a great deal on UK or USA based hosting, multi-domain hosting and fully managed dedicated servers.
Reply With Quote
  #11 (permalink)  
Old 12-08-2006, 07:18 PM
brian's Avatar
Administrator
 
Join Date: Apr 2006
Posts: 229
Default Re: Host Nightmare

Thanks for that.
Reply With Quote
  #12 (permalink)  
Old 12-08-2006, 08:21 PM
Super Moderator
 
Join Date: Mar 2006
Posts: 454
Default Re: Host Nightmare

Alternatively can you get remote MySQL access ?

If so, then use the MySQL Administrator tool to do your backup, you get a nice GUI and you can do everything from your desktop. It also has a schedule option on the backups, but I've not used that myself though.
__________________
Alex Monaghan - Monaghan Consultants Ltd
Web hosting, ADSL & more
Custom Web hosting (UK or USA)
Mobile Ringtones, Games & more
Reply With Quote
  #13 (permalink)  
Old 16-08-2006, 08:11 PM
triumph's Avatar
Senior Member
 
Join Date: May 2006
Posts: 123
Default Re: Host Nightmare

Tony,

So simple yet I never got it figured out. Thanks so much. That is exactly what I needed.

Now I just need to get a script for ftp to go fetch it and put it on a backup server.

Anyways, this is perfect. Thank you so much.


Quote:
Originally Posted by TWD_Tony
You can either create a SQL database backup via a cron job - or you can use a small peice of php to do it for you...

Create a new file in notepad and copy and paste the following into it:

<?php
#Create a dump
$cmd = `/usr/local/nf/bin/mysqldump -u Username -pPassword databaseID > dbBackupFile.sql`;
?>


Now save the file as a .php file (backupdb.php for example) and upload it to your www folder.
You can now call this script via a cron job as often as you wish - thi script will create a backup in your www directory.
Don't forget to change the Username, Password and dabaseID for your details

I also know of a script that will create a sql backup and email it you as an attachment if anyone is interested?
edit: I just saw the e-mail option and I would love to have that myself. Would be perfect for me.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT +1. The time now is 08:59 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.