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 ?



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.


| 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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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