Perhaps you use rsync, Time Machine or similar backup software mirroring your files to external drives for your PCs on a regular basis. What about your remote web server? Webmoney has written an article – Back Up a Web Server, which taught us the ways you can backup the HTML files, stylesheets, application files and databases on your remote web host. The only thing you’ll need is a remote web hosting service allowing SSH connections to the remote shell. The followings are the main topics.
The Backup Tools
The first thing we’ll do is use tar and bzip2; two command lines tools for making compressed file copies, to back up HTML, CSS, Javascript or any other text files.
Automation
Now we have a couple of bash scripts we can invoke from our terminal prompt and backup our files. Great, but who wants to do it manually? Instead, let’s set them up to run automatically once a day.
Locking
Long-running scripts like backups started through cron have a common problem. A new one may get fired off before the previous one is complete. This problem can be solved using a simple lock file.
Logging
Automated scripts should keep a log of what they do in case things go awry. This is an example of writing to a log file, with a start and end time.
Fancier Automatic Backups
Want to get really fancy and have your home machine automatically log in to your server and download those backup files for safe, off-site keeping?
Finishing Touches
Now you should have a shell script set up and a way to log in to your remote server sans password (whether by the insecure method above or the ssh-agent method). The last step in our automation process is to create a cron job on our local machine.
Source: Back Up a Web Server





good find! haven’t seen anything decent from webmonkey in years
How to Backup a Web Server…
Perhaps you use rsync, Time Machine or similar backup software mirroring your files to external drives for your PCs on a regular basis. What about your remote web server? Webmoney has written an article – Back Up a Web Server, which taught us the ways …
This is a fantastic article. We’re actually going to be backing up our web server and wanted to properly do it with a cron job to make things easier and automated. This covers exactly what we’re looking for. Probably one of the best finds on WebAppers and WebMonkey. Thanks!
Colin, i had no idea you were on here too
Great reference for apps, check the top 10 stunning mac design websites.. impressive
[...] How to Backup a Web Server [...]
[...] that you have good, safe backups of your database.Source: Bulletproof backups for MySQLRelated PostsHow to Backup a Web ServerMosso Advanced, Enterprise-Level Hosting SystemCalendar System Using MySQL and [...]
RSS feed for comments on this post · TrackBack URI