Specifications
Backing Up Data
You cannot underestimate the importance of backups in any disaster recovery plan. Hardware
and buildings can be insured and replaced, or sites hosted elsewhere, but if your custom-
developed Web software is gone, no insurance company can replace it for you.
You need to back up all the components of your Web site--static pages, scripts, and databases--
on a regular basis. Just how often you do this depends on how dynamic your site is. If it is all
static, you can get away with backing it up when it’s changed. However, the kind of sites we
talk about in this book are likely to change frequently, particularly if you are taking orders
online.
Most sites of a reasonable size will need to be hosted on a server with RAID (a Redundant
Array of Inexpensive Disks), which can support mirroring. This covers the situation in which
you might have a hard disk failure. Consider, however, what might happen in a situation where
something happens to the entire array, machine, or building.
You should run separate backups at a frequency corresponding to your update volume. These
backups should be stored on separate media, and preferably in a safe, separate location, in case
of fire, theft, or natural disasters.
Many resources are out there on backup and recovery. We’ll concentrate on how you can back
up a site built with PHP and a MySQL database.
Backing Up General Files
Backing up your HTML, PHP, images, and other non-database files can be done fairly simply
on most systems by using backup software.
The most widely used of the freely available utilities is AMANDA, the Advanced Maryland
Automated Network Disk Archiver, developed by the University of Maryland. It ships with
many UNIX distributions and can also be used to back up Windows machines via SAMBA.
You can read more about AMANDA at
http://www.amanda.org/
Backing Up and Restoring Your MySQL Database
Backing up a live database is more complicated. You want to avoid copying any table data
while the database is in the middle of being changed.
Instructions on how to back up and restore a MySQL database can be found in Chapter 11,
“Advanced MySQL.”
E-commerce Security Issues
C
HAPTER 13
13
E-COMMERCE
SECURITY ISSUES
301
17 7842 CH13 3/6/01 3:36 PM Page 301










