Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 configuring for the first time a VPS service and I'm wondering how I could setup automatic backups of my websites.

Should I let handle it by apache ? Or operating system level ?

Also, is there something I should know about configuring a VPS for multiple websites ?


share|improve this question
up vote 1 down vote accepted

I'm doing that every week with a shell script that creates a TAR file in /root and copies it using SCP.

It creates on files per mysql database, copy your local ldap directory if you have one.

It requires that you have a destination machine on which you can connect with a SSH key that's installed on your local machines.

With those assumptions satisfied, here is the script.

share|improve this answer

It depends on your configuration and your aim. Do you have mysql? Only static pages and PHP scripts?

As a minimum, you could use rsync to copy your files from your VPS to another place. It's quite standard and very flexible.

share|improve this answer

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.