Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running a Linux server where incremental backups (ideally daily) are required. I want things to remain fast, but for the backups to be reliable.

I'll be using Apache and a MySQL database, what's a good solution?

share|improve this question
Remember that using rsync alone only gives you one generation of backup. You'd do well to use something like rsnapshot to get a multi-generation backup. – Evan Anderson May 22 '11 at 16:55
just curious, how exactly are you running a software RAID Array 12 TB on a 1 U box. How many bays on the box? Also are you happy with the performance – ramdaz May 23 '11 at 17:53
up vote 2 down vote accepted

For most of your files, rsync will do the job very nicely, however for the database, you will probably need something more specialised (or create a db dump file which can be rsync'd to the backup and then imported in to the backup db).

Set up password-less ssh between the 2 servers (by exchanging ssh keys) and then you can use a command like this to copy the files (run on the 'master' server):

rsync -az --delete /path/to/backup/ backup-server:/path/to/backup/

This will copy the entire directory tree /path/to/backup to the same path on hostname backup-server. The rsync options are -a (archive mode) preserve user/owner/permissions for each file, and -z to compress files before transferring them and decompress them on the receiving end automatically. The --delete flag deletes files which are on the backup server but no longer on the master server.

Use cron to start this command when required.

All this assumes that the 2 servers are running Unix/Linux.

share|improve this answer
If you're concerned about bandwidth usage, you can limit the bandwidth rsync uses with --bwlimit=KBPS. See this answer for details: – dr-jan Apr 29 '13 at 10:58

You don't tell anything about the platform, the database used or whatever.

Nevertheless, at least for the file part, I would have a look into rsync, which works very well for large file trees.

share|improve this answer
I'm using Ubuntu Server with an mySQL database. – joesavage May 22 '11 at 13:25

Without getting some expensive, complicated software. You could just set up a cron-job to run an RSYNC task once a day. (That, of course assumes you're running UNIX/Linux. If you're running Windows I'm not sure)

RSYNC has the advantage of only transferring new files or files that have changed. You can even specify RSYNC to delete stuff on the backup server no longer present on the main server.

share|improve this answer
This sounds like a great solution (I'll be running Ubuntu Server). I'll look into this! – joesavage May 22 '11 at 13:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.