I'd like to decouple my Drupal 7 installation from the OS package management.

This is because Ubuntu's current LTS version (14.04) has Drupal 7.26, imported from the Debian packages at the time of release - it's now fixed at that version and they won't move to a later one.

Some security fixes have been backported, but not necessarily all. This is mostly due to policy issues with regards to software versions within the Ubuntu project, so the best solution is to reinstall my Drupal instance so that it's not under the control of the package management system.

I've been looking for information on this for a few days now, and can't find much of use.

I have the Backup and Migrate module, so can use that. I also have drush installed (albeit, ironically, via package management).

I can't get drush to update Drupal at all. My experience here (remembering back to Drupal 6) is that the Ubuntu package management has set some kind of flag that means Drupal doesn't check for updates for itself, only for modules & themes. "sudo drush up drupal" results in "specified project not found" for the drupal project.

Drush is updating modules and themes OK, just not core - so I believe I can probably install via drush.

My current plan is this:

  1. Perform a backup (drush bam-backup)
  2. Stop apache (service apache2 stop)
  3. Remove the packaged version of Drupal (apt-get remove drupal7)
  4. Install Drupal (drush dl drupal)
  5. Restart apache (service apache2 start)
  6. Restore the backup (drush bam-restore)

Does this look OK? Will I need to do anything between steps 4 & 6 (like set up the website system again)? Or am I approaching this the wrong way entirely?

1 Answer 1


If the site were mine I would first test the database against a new installation before I destroyed the old site.

I have never used the bam module so I do not know a lot about that. What I would do is dump the DB (drush sql-dump > site.tld.data.sql or something like that). Restore that backup to a new database and install the latest release of Drupal 7 and attach that to the restored database. With the new code base you will need to run drush updb to get all the SQL updates to your older database. The issue you are really going to face is modules. How have you installed modules for your existing site? Manually? If you have just copy your sites/all/modules (or wherever they may be) to the test Drupal instance.

Of course you could do all of this locally on a dev machine without touching your site if you have that setup (Linux Desktop?).

After I got a warm fuzzy with the database being OK to run on a manually installed Drupal you could then attack your site and replicate the process. Again I am unfamiliar with the BAM module.

  • Thanks Brady - based on your recommendation, I've now got a rough path forwards. The BAM module is pretty good for automating my restores, but it needs extra work to get the restore done. (It can back up the whole site, including a DB dump, into a tar file. But it's not smart enough to then look in the tar file when restoring - you have to extract the dump by hand first!) I've set up a VM to play with, and have found that manual backups of key files (modules, public files, .htaccess/Apache configuration) and an SQL dump seems to work. It's still a major job, but now one I'm confident doing. Nov 25, 2014 at 22:27

Your Answer

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

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