Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I need a suitable backup automation script that will run in PHP on my apache server.

Some of my sites run Drupal. Which is the most suitable method to automatically backup both the code and the database?

share|improve this question
    
You really don't want to try to do this from within the webserver: Most have a 5-minute request timeout, and a backup of a large site could take way more than that. Something scheduled out of cron would be better. –  voretaq7 Jan 26 '11 at 19:35
add comment

1 Answer

You should consider using tar in a daily script for your websites, and for the database, just dump it:

mysqldump -u USER -p DATABASE > filename.sql
share|improve this answer
add comment

Your Answer

 
discard

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.