Go Back   HostGator Peer Support Forums > Public Forums > Suggestions

Notices

Reply
 
Thread Tools
  #1  
Old 02-08-2006, 04:05 AM
Ramirojr's Avatar
Ramirojr Ramirojr is offline
Hatchling Croc
 
Join Date: Feb 2006
Location: Oaxaca, Mexico.
Posts: 8
Lightbulb Notification of maintenance.

My suggestions is that site owners and resellers be notified in advance by e-mail when scheduled maintenance jobs, upgrades, etc. are going to be held on specific servers.

Right now the only way to know about this services is by logging in the forum and read the announcements. We can clearly see that this is impractical as well as time consuming.

Almost all hosting companies (at least that I am aware of) do this and prevents a lot of complaining from users when we see our site back to a previous state after several hours of lost work. Also, it remind us to make a full backup, prevents from big changes on our sites, etc.

The list of advantages can go on and I'm sure you can implement this very easily through mailing lists, so please take into account this suggestion.

Keep up the good work!
Reply With Quote
  #2  
Old 02-08-2006, 11:09 AM
jeff_s jeff_s is offline
Baby Croc
 
Join Date: Feb 2005
Posts: 69
Default Re: Notification of maintenance.

Quote:
...site owners and resellers be notified in advance by e-mail when scheduled maintenance jobs, upgrades, etc. are going to be held on specific servers...
Despite the many good things there are to say about HostGator, and despite the number of customers who have asked for this service in these forums, HG has steadfastly refused to offer this seemingly simple thing. Even if only for the resellers who must answer to their clients.

I sincerely hope they prove me wrong, but I'm just letting you know it's been requested here numerous times before.

-jeff_S
Reply With Quote
  #3  
Old 02-08-2006, 12:52 PM
quietFinn's Avatar
quietFinn quietFinn is offline
Veteran Croc
 
Join Date: Feb 2005
Posts: 3,558
Exclamation Re: Notification of maintenance.

I'd also like to get this kind of service !
I don't mind if I'd have to sign up for that, and I don't mind if I'd get notifications regarding all the servers.
__________________
quietFinn - netFinn Finland
"Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss
Reply With Quote
  #4  
Old 02-08-2006, 02:31 PM
Serra's Avatar
Serra Serra is offline
Veteran Croc
 
Join Date: Feb 2005
Location: Orange Park, FL
Posts: 5,073
Default Re: Notification of maintenance.

Quote:
Originally Posted by quietFinn
I'd also like to get this kind of service !
I don't mind if I'd have to sign up for that, and I don't mind if I'd get notifications regarding all the servers.
I don't see why HG couldn't setup a opt-in mailing list for this type of stuff, even if the list is for ALL servers. It wouldn't take a second to delete emails about maintenace on machines I'm not on.

My prior two hosts used a calendar system to notify users of updates and changes.

Quote:
Almost all hosting companies (at least that I am aware of) do this and prevents a lot of complaining from users when we see our site back to a previous state after several hours of lost work. Also, it remind us to make a full backup, prevents from big changes on our sites, etc.
I really doubt that HG plans to have to restore sites. Very few upgrades require the trashing of sites. Most of these would be emergencies and then it woudn't matter if they notified us or not, it would still happen. We can check the forum to see if their is a notification.
__________________
Six stages of Dedi Ownership

Fashionable broken link
image included
Reply With Quote
  #5  
Old 02-08-2006, 08:18 PM
13th_star's Avatar
13th_star 13th_star is offline
Hatchling Croc
 
Join Date: Feb 2006
Location: Crewe, Cheshire (United Kingdom)
Posts: 19
Post Re: Notification of maintenance.

the only problem i have is that my user's upload pictures and update information on the mysql daily.

I dont mind about being contacted or not, I'd just like it if hostgator were sure to have a recent backup of mysite. so it could be inserted again, and will be like nothing has happend.
Reply With Quote
  #6  
Old 02-08-2006, 09:36 PM
twisty twisty is offline
Baby Croc
 
Join Date: Nov 2005
Posts: 50
Default Re: Notification of maintenance.

Well you should never depend on any host for your database backups - imho.

It's probably less risky with a reputable host like HG but still...bad idea.

I have mine automatically backed up every night via cron using a PHP script. One copy ends up in my FTP account and the other gets emailed to a webmail account (I use gawab.com, and use a filtering rule which sends them directly to the trash can where they are auto deleted after 20 days so that I don't even have to login to clean it out at all).

Zero hassles and total safety
Reply With Quote
  #7  
Old 02-08-2006, 11:26 PM
Unregistered
HostGator Guest
 
Posts: n/a
Thumbs up Re: Notification of maintenance.

lol i am no good with cgi ,i can barely even write php. But i guess i should look into it,
thanks
Reply With Quote
  #8  
Old 02-08-2006, 11:27 PM
13th_star's Avatar
13th_star 13th_star is offline
Hatchling Croc
 
Join Date: Feb 2006
Location: Crewe, Cheshire (United Kingdom)
Posts: 19
Default Re: Notification of maintenance.

upps forgot to login
Reply With Quote
  #9  
Old 02-09-2006, 12:44 AM
twisty twisty is offline
Baby Croc
 
Join Date: Nov 2005
Posts: 50
Default Re: Notification of maintenance.

Here's the PHP script I use (It's a slightly modified / improved version of the one found here - http://www.notonebit.com/ - by scanman)

<?
$datestamp = date("Y-m-d"); // Current date to append to filename of backup file in format of YYYY-MM-DD

/* CONFIGURE THE FOLLOWING SEVEN VARIABLES TO MATCH YOUR SETUP */
$dbuser = "user"; // Database username
$dbpwd = "pass"; // Database password
$dbname = "database_name"; // Database name.
$filename= "$dbname-$datestamp.gz"; // The name (and optionally path) of the dump file
$to = "backup_email@gawab.com"; // Email address to send dump file to (gawab.com webmail is recommended, filter to the trashcan using a rule)
$from = "my_email@account.com"; // Email address message will show as coming from.
$subject = "$dbname MySql Backup For: $datestamp"; // Subject of email

$command = "mysqldump -u $dbuser --password=$dbpwd $dbname | gzip > $filename";
$result = passthru($command);

$attachmentname = array_pop(explode("/", $filename)); // If a path was included, strip it out for the attachment name

$message = "Compressed database backup file $attachmentname attached.";
$mime_boundary = "<<<:" . md5(time());
$data = chunk_split(base64_encode(implode("", file($filename))));

$headers = "From: $from\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: multipart/mixed;\r\n";
$headers .= " boundary=\"".$mime_boundary."\"\r\n";

$content = "This is a multi-part message in MIME format.\r\n\r\n";
$content.= "--".$mime_boundary."\r\n";
$content.= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n";
$content.= "Content-Transfer-Encoding: 7bit\r\n\r\n";
$content.= $message."\r\n";
$content.= "--".$mime_boundary."\r\n";
$content.= "Content-Disposition: attachment;\r\n";
$content.= "Content-Type: application/x-gzip; name=\"$attachmentname\"\r\n";
$content.= "Content-Transfer-Encoding: base64\r\n\r\n";
$content.= $data."\r\n";
$content.= "--" . $mime_boundary . "\r\n";
mail($to, $subject, $content, $headers,"-f $from");

// unlink($filename); // delete the backup file from the server after mailing (optional)

?>
Reply With Quote
  #10  
Old 02-09-2006, 01:54 AM
Ramirojr's Avatar
Ramirojr Ramirojr is offline
Hatchling Croc
 
Join Date: Feb 2006
Location: Oaxaca, Mexico.
Posts: 8
Default Re: Notification of maintenance.

Quote:
Originally Posted by 13th_star
I dont mind about being contacted or not, I'd just like it if hostgator were sure to have a recent backup of mysite. so it could be inserted again, and will be like nothing has happend.
This was precisely what happened to me. I usually work a lot at night and I had just deployed a mambo installation from scratch and had started to tweak the site. I had been working 4 or 5 hours when I lost my site completely. A crash at Audi required a restore which brought back my site to nothing. Bad luck I guess. I didnīt even had time to make my first backup.

What I would like to know is if the suggestions in this forum are read by the HG staff, so that they coud be really taken into account.

One last question to twisty. What (How) exactly do I have to do to implement the script in this thread.

TIA
Reply With Quote
  #11  
Old 02-09-2006, 02:24 AM
13th_star's Avatar
13th_star 13th_star is offline
Hatchling Croc
 
Join Date: Feb 2006
Location: Crewe, Cheshire (United Kingdom)
Posts: 19
Thumbs up Re: Notification of maintenance.

wow thanks for the script dude, looks like ive set it up ok, just gotta hope the cronjob ive set works.

Reply With Quote
  #12  
Old 02-09-2006, 04:12 AM
twisty twisty is offline
Baby Croc
 
Join Date: Nov 2005
Posts: 50
Default Re: Notification of maintenance.

Quote:
Originally Posted by 13th_star
wow thanks for the script dude, looks like ive set it up ok, just gotta hope the cronjob ive set works.

You may need to CHMOD the folder containing the script to 777. I used to have it set to 700 on shared, but then upgraded to semi-deicated and 777 was the only permissions setting that would work.

The cron command I use is something like this...

/usr/bin/php /home/account_name/path/to/script.php

Reply With Quote
  #13  
Old 02-09-2006, 04:18 AM
Ramirojr's Avatar
Ramirojr Ramirojr is offline
Hatchling Croc
 
Join Date: Feb 2006
Location: Oaxaca, Mexico.
Posts: 8
Default Re: Notification of maintenance.

Quote:
Originally Posted by Ramirojr
One last question to twisty. What (How) exactly do I have to do to implement the script in this thread.
Well, I copied, modified the indicated fields and then saved the script to a file named daily_backup.php and uploaded the file to my root directory. Then I went to cpanel and created a cron job. I received the e-mail with the *.gz attached file, but could not open it with winrar as I open other files made with the backup utility of cpanel which are *.tar.gz

Any advice on my procedure?
Reply With Quote
  #14  
Old 02-09-2006, 04:21 AM
twisty twisty is offline
Baby Croc
 
Join Date: Nov 2005
Posts: 50
Default Re: Notification of maintenance.

Quote:
Originally Posted by Ramirojr

One last question to twisty. What (How) exactly do I have to do to implement the script in this thread.

TIA
Just create the php file and configure it as per the included comments, then login via FTP and upload the script to a folder called 'backups' or whatnot, and then go to the cron manager in CPanel and set it up to run the script once every day at midnight.

Obviously you'll need to create a webmail account first though. All other info I posted in this thread should be enough to proceed
Reply With Quote
  #15  
Old 02-09-2006, 05:12 AM
13th_star's Avatar
13th_star 13th_star is offline
Hatchling Croc
 
Join Date: Feb 2006
Location: Crewe, Cheshire (United Kingdom)
Posts: 19
Cool Re: Notification of maintenance.

Quote:
Originally Posted by twisty
You may need to CHMOD the folder containing the script to 777. I used to have it set to 700 on shared, but then upgraded to semi-deicated and 777 was the only permissions setting that would work.

The cron command I use is something like this...

/usr/bin/php /home/account_name/path/to/script.php

thats just how i did lol, and its working thanks.

oh and if you cannot read the file on your computer, just go to the file that went to the ftp and your ie will encode it so you can view it properly in plain english .
Reply With Quote
  #16  
Old 02-09-2006, 01:25 PM
twisty twisty is offline
Baby Croc
 
Join Date: Nov 2005
Posts: 50
Default Re: Notification of maintenance.

Quote:
Originally Posted by 13th_star
thats just how i did lol, and its working thanks.

oh and if you cannot read the file on your computer, just go to the file that went to the ftp and your ie will encode it so you can view it properly in plain english .
Yeah it's .gz compressed which is standard procedure for backups, you can open such files directly with a freeware app like 7Zip for example. WinRAR supports that file format as well.

Btw you can directly import .gz compressed databases as well if a backup is ever needed.
Reply With Quote
  #17  
Old 02-15-2006, 12:19 AM
Ramirojr's Avatar
Ramirojr Ramirojr is offline
Hatchling Croc
 
Join Date: Feb 2006
Location: Oaxaca, Mexico.
Posts: 8
Default Re: Notification of maintenance.

Quote:
Originally Posted by Ramirojr
Well, I copied, modified the indicated fields and then saved the script to a file named daily_backup.php and uploaded the file to my root directory. Then I went to cpanel and created a cron job. I received the e-mail with the *.gz attached file, but could not open it with winrar as I open other files made with the backup utility of cpanel which are *.tar.gz

Any advice on my procedure?
Well I will quote myself just to clarify the procedure to other newbies like myself. :-)

Copy the the script and paste into a new file. Name the file "something.php". Edit the mentioned variables in the script as needed. Save the changes.

As stated, the folder where the script will reside must be CHMOD to 777, otherwise you will not be able to open the *.gz file like it happened to me or you won't even get a file. I also CHMOD the file to 777, but I guess it's not necessary.

The command in the cron job must be set like this :

GET http://yourdomain.com/script-file-folder/something.php > /dev/null

Thank you all. I hope this helps.
Reply With Quote
Reply

Bookmarks

Thread Tools

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 Off
HTML code is Off

Forum Jump

All times are GMT -5. The time now is 08:04 PM.