I'm trying to backup my Drupal website (not only database) as complete as possible, because It's in the desired state. The backup should cover actual versions of all modules, themes, database tables, settings, just everything. Now my method is to zip everything under /var/www/ folder and backup the database with Backup migrate module. The restore process is

  1. delete everything in /var/www
  2. drop database and create it again and set permissions on it
  3. unzip my backup to /var/www
  4. restore with Backup migrate module

Will this method work? Do you know smarter method to make a complete Drupal web backup?

  • +1 for a good question (btw, that's what I do too (alas, my host won't let me use Drush)) Nov 27, 2011 at 2:30

2 Answers 2


Will this work?


Is there a smarter method?

Drush + drush make

Drush is a command line tool that you can use for various things, one of them is to create a site. With a drush make file, you can save all of the modules you use (including version and even patches applied to them if needed). Once create you could recreate all of the modules by doing something like this:

drush make --no-core --contrib-destination=[path to the contrib folder like sites/all] [path to the make file]

You can read more about drush and drush make which has documentation about usage.

Also backup and migrate will or can add a drop syntax, so that it automatically drops tables when restoring the database. So using it, you wont need to wipe out your database completely. If need be, you can truncate it so you wont have to setup permissions again.


Be careful with Backup and Migrate, because:

  1. Backup and Migrate just handles the Database as expected. But if you have to restore the complete Website, you probably would like to restore the appropriate backend (php-files, themes, modules, etc.), too
  2. Backup and Migrate can back up the Full site, but you can not restore its own full site Backup! Backup and Migrate says: "Files were not restored because the archive did not seem to contain a files directory or was in a format that Backup and Migrate couldn't read" :-( And: "Backup and Migrate cannot restore the php code of the site for security reasons. You will have to copy the code to the server by hand if you wish to restore the full site." :-(

Btw: "Backup and Migrate cannot restore ... for security reasons". If a hacker has Access to the Admin-Protal, then it's too late to stop the hacker by modules. Therefore Backup and Migrate does not increase the security, but blocks the usual Administration work.

To answer your question: No, Backup and Migrate is no solution for a complete backup (and restore) which can be handled by normal Website Admins without bash skills.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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