Do you have a question? Post it now! No Registration Necessary. Now with pictures!
March 20, 2005, 9:15 pm
rate this thread
Hi Guys and Gals
I have a PHP, MySql website. I was wondering what you would recommend as a
back-up system for the data (and if pos) also the pages.
I can think of several ways to do this (e.g. just download it everyday), but I
was wondering if anyone had any "best practice" kind
Let's do away with pages first. Pages you have on the production
server should be considered expendable copies. The original code
should be stored away (on your home/office computer and perhaps
on a CD-ROM). This way, in the event of catastrofic loss, you
can restore your application quickly and painlessly.
Now, data. The simple answer is, it depends. Ideally, you want
replication -- the entire server is mirrored on a separate physical
machine, usually located elsewhere. This, however, is not feasible
to expect, unless you are running a really expensive setup. Most
hosting providers don't even allow you remote access to their
OK, for starters, you should ask yourself these questions:
1. How much data can I afford to lose?
The less data you can afford to lose, the more often you should
back up. By deciding to back up daily, you essentially decide
that you can live with a loss of day's worth of data. The
ultimate form of data loss aversion would be replication,
which is essentially continuous backup.
2. If I do lose that much data, will I be able to live without
it or will I have to restore it somehow, even if it means
reentering it manually?
The more serious the consequences of data loss, the more money
and effort you should be willing to spend on fault protection.
Sorry to be vague, but withount knowing how important and expensive
data is it's difficult to recommend ways of protecting it...
I use replicaition to a 2nd server for our clinical data (very critical)
and use backup scheme on this replicating machine so it is not
neccesarry to lock my first (original) database which is not wanted in
The backup is done by the MySQL backup script from the
It is a very extensive script but it works as a treat for me. It
supports features like:
- compress backup
- rotation scheme
- mail success/failure messages
- mail backup as attachement
- works on linux as well as on windows machines (for the latter it uses
a few extra utilities you have to download if you want compression and