Best Strategy for Backing up Web Server
Everything regarding our web server is on a single drive, seperate from the installation drive.
Got a Apache, MySQL, PHP and WWW folder (I guess I don't need to explain what is in each huh?)
This all is on a server at our webhost, but of course I got direct access via RDC (it's a dedicated server) and FTP.
What would be the best way to back up the system?
A copy of the www folder of course. Other than that all i can think of is the mysql databases.
I guess it wont work to run a nightly FTP download of everything on the drive. Dont think a simple "copy it back" will result in a fully functional database.
Reason I'm asking is that the database backup plan suggested by the host (they are great..not going to change) are really expensive. And it does not seem to be much more than a nightly copy of the www folder.
By the way, it's a windows 2003 server, running apache,php and mysql. (yeah i know..linux would have rocked but this was decided on someone else for some smart @r$ed reason i still dont know what)
Re: Best Strategy for Backing up Web Server
Download the www files; run mysqldump for each MySQL database; download the SQL dump files.
Code:
C:\> mysqldump databasename > databasename_datetime.sql
To import an SQL dump file, run mysql.
Code:
C:\> mysql databasename < databasename_datetime.sql
Re: Best Strategy for Backing up Web Server
At work we FTP the www folder, a mysql dump of each db and also the raw database files. Not sure about windows but on our linux servers under the mysql folder there is a folder for each database, in there is the plain text files for each table data and structure, we tar the lot up and FTP it to a backup server. The folder for each db can just be uploaded or overwritten when restoring a backup.
Have you got a bandwidth limit? It's worth shopping around for a host, all our servers come with a free backup server are unlimited bandwidth which permits us to transfer our 5GB of backup data per night, per server.
This backup system requires no maintenance as there is a 7 day turnaround, a days backup gets stored as backup-sitename-Day.tgz where Day is the shortname for the day so that after a week the tar gets overwritten, so we only ever store the last 7 days worth of backups.
Re: Best Strategy for Backing up Web Server
you can also set up a cronjob to backup the database for you. Not sure about the www though.
Re: Best Strategy for Backing up Web Server
It will have to be task scheduler in windows or a custom application that executes the backup system.
We use crontab on our linux servers to execute a shell script file, which runs each backup item such as web files, mysqldump, db files, ftp.
There is no limit to what you can do... www, db or whatever, you could use task scheduler to execute a .bat files that runs your backup system. Or your own vb app etc etc.