Backup and Migrate is great as a backup system and thus allows some sort of versioning. This enables me to roll back easily when developing and testing small sites which I tend to develop in a live environment.Migrating a dev version to a live site is also quite easy this way.

Backup and Migrate does not work for SQLLite, however. I assume the best would be to put the site in maintenance mode, and copy the .ht.sqlite as a backup ... restoring should then be the same in reverse.

Am I on the right track?


2 Answers 2


I suggest the use of the Read only mode module, it places your site in the maintenance mode, but your visitors can still view the site without enter or change content.

Then make a copy of your database and get out of the maintenance mode.

  • Never heard of this module! Could help also (a bit) for D6 sites that haven't upgraded yet, to reduce the risk of being hacked! At least for the sites that are considering "convert entire D6 site to static HTML"? Commented Mar 27, 2016 at 7:15
  • 1
    @pierre.vriens maybe this could be a way. Commented Mar 27, 2016 at 13:00
  • That's what I'm also starting to think about it! Commented Mar 27, 2016 at 13:16

In general that sounds ok. You should also establish a shared lock on the database file using the SQLite API though.

There is also a backup api. So if you do this more often, maybe you could write a module for that.

More info: https://www.sqlite.org/backup.html

  • I was hoping that someone else had started a module, or there being a separate php snippet that can do this ... Commented Jan 24, 2016 at 10:09
  • Haven't seen any so far. Your chance to add to the Drupal module universe ;-)
    – bechtold
    Commented Jan 24, 2016 at 10:10
  • My coding skills are limited enough to make me struggle with php, never mind working with modules in Drupal, unfortunately. Commented Jan 24, 2016 at 10:17

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.