|
Setting Up Automated MySQL Database
Backups on HTTPme Servers
|
|
I needed a way to backup individual MySQL databases and was using a nice little scheme that called "mutt" in a CRON to send the output results to me. Unfortunately mutt is no longer a standard install on the servers and they would prefer we use Exim. How to do that? I was stumped and finally figured out that the standard *nix "sendmail" was aliased to Exim. The theory here would be that if the mail server is changed to something other than Exim, this would still work. This database backup is configured per domain as I didn't need them all backed up every day, but needed some of them twice a day so this can be run as often as wanted with a CRON job. After the job runs, the compressed sql dump file will be emailed to the address indicated in the script (explained below in detail). IMPORTANT: There will be a zipped file at the end that you can download - it contains the sample shell script, the sample php mailer script and a PDF document of these instructions in landscape format. You'll need to get the mailer class from the link also furnished at the bottom. |
|
webdomain.com (account username: webdom) will be used as an example:
#!/usr/bin/php
Move this file to the server and change permissions as noted in the first sentence of step 5. If for some reason the mail gets created but is undeliverable, check the /home/webdom/mail directory (at the same level as your public_html directory) and download the "inbox" file to view it. Returned mail will end up here. Credits: The original idea came from a post here: http://www.HTTPme.com/showthread.php?threadid=8897 - I simply replaced the method of sending the email. Thanks to all who contributed to the above thread. |
|
Download Sample Files (10k) I apologize for being so verbose but was trying to remember the days when I didn't have a clue how to do any of these things! This works on Comet and Cheetah - should be pretty generic. |