We are considering to migrate an exiting website to Drupal: www.rkmission-shivanahalli.org The website has simple static content which I believe is not a big deal to migrate to Drupal.

However, there is one requirement which is pretty unconventional and not many websites have it. The archives feature. What we have been doing is, since currently the website is only collection of html files, we pick the whole web folder of current edition and place it into archives folder of the website and link the new website to the index.html page of that archived folder. We also have a link to get back to the current edition from the archives section.

Please see this link for more details, the archives page of current edition: http://www.rkmission-shivanahalli.org/archives.html

One of the edition from archives page will have a link like: http://www.rkmission-shivanahalli.org/Archives/AUG_2006/index.html.

Now I am not very sure how to achieve this using Drupal. Is there any direct way to do this? Or, any modules which does it on my behalf? Or, do I have to modify any source files etc.?

Thank you for any suggestions.

PS: This is a mirror of the question already asked in Drupal forums: http://drupal.org/node/1884930

  • You can create a new view with path like archive/Year/Month. Then use cron to execute under certain conditions and set a field like archive=yes You will alao need to set the view's contextual filter to accept the date arguments.
    – Mike
    Jan 19, 2013 at 22:55
  • In my opinion, in Drupal terms you can accomplish this my using organic groups, with name of each organic group being Aug_2005, Sep_2005 and so on. Each OG will have their own menu using OG MENU.
    – Minty
    Jan 20, 2013 at 15:55

4 Answers 4


My immediate thought is to use version control software like Git or Subversion to store your code, and use some kind of standardized process to:

  1. create a branch/tag/snapshot the current code
  2. deploy the tag to a new location on the web server
  3. create a copy of your database
  4. update the settings.php file in the deployed tag to point to the new database

Depending on your Drupal configuration and your requirements, you might also need to copy your public files folder to the new location, as this folder is usually excluded from version control. If this is the case, be sure to specify your file system paths in Drupal's admin area with relative paths, not absolute.

Finally, you'll either need to create a new virtual host in your web server's configuration each time, or come up with a catch-all virtual host definition (I did this once to spin up branch sites automatically for QA, using subdomains, server alias wildcards, and rewrite rules, e.g. branch "foo" = foo.mysite.com = /var/www/mysite/branches/foo).

You can automate much of this process with shell scripts or a tool like Capistrano.

  • I had tried this way, this was the nearest to solution I could have got. But I had not thought of updating the settings.php file and get a copy of the database into new location. I have a question however. My site would have assets which would be common to many editions of the website. Instead of copying the assets too, is there a way that Drupal can refer for assets from some common location? Jan 18, 2013 at 6:25
  • If you don't need to worry about archive site activities overwriting production assets (and vice versa), you might put your assets directory somewhere outside the Drupal file system, then symlink to this directory from within the Drupal file system. You can check this symlink into version control, so the symlinked directory for all new archive sites will always point to the same source directory.
    – Dave
    Jan 19, 2013 at 5:24

AFAIK the features provided by the Demonstration site (Sandbox / Snapshot) module are the closest as per your requirements. It has the feature that allows you to take snapshots of your site, use it as sandbox and later (if you want) restore it back to any of the previous saved state.

This module allows you to take snapshots of your site. Whenever you need to reset your site to the state of a saved snapshot a click of your mouse will do so.

With cron enabled, a site can be automatically reset to a chosen snapshot in a definable interval.

  • Backup/archive of uploaded files and restore upon reset. To allow sandboxes for file related modules.
  • Journal module integration to show recent changes in snapshots.
  • Demo Reset security improvements to allow to demonstrate administrative functionalities more easily.

There is also a Demonstration Site Install Profile which allows restoration of the Demonstration Site module's database dumps during site installation.

  • Thanks for the inputs, is there any way that I can use this module to archive the website and make it retrievable on request instead of taking snapshot and restoring it back to that version? Jan 15, 2013 at 8:54
  • @Raj The features are pretty much same as archiving the site. But, I'm not sure if different users can use different versions of the site snapshots simultaneously. If not you can use the module as a starting point and post a feature request in the module's issue queue, and work with the maintainer to get this done :-)
    – AjitS
    Jan 15, 2013 at 15:03

As you've stated this is a unique feature to your site. Bear in mind with Drupal as a CMS some things like built-in Search using Drupal or "login blocks" wouldn't work on archived sites unless you look at @indrock approach of snapshots of the site. Drupal is a dynamic database-driven CMS.

If you're sticking with mostly static pages. This blog post might interest you on archiving drupal and making it accessible as HTML pages. A comment to that page mentions the Boost module. If you were clever and could write your own module in Drupal I believe. You could leverage Boost and specify your own cache directory(s) to work as the snapshots you've mentioned. You could even use a webservice or old code you have on-hand to grab the homepage image. You'd then use an Apache rewrite rule, or absolute url link to point users to the archived "cache" directories from Boost per Month/Year.

You could probably easily Cron archives as needed. I think trying to boost and a custom module actually wouldn't be a TON of code. I haven't done this -- as you've said its fairly specific functionality.


http://archive.org/web/web.php i think this helps you here you can even choose date/month/year as per your requirement

  • 4
    Can you explain a little bit how to integrate the Wayback Machine into Drupal?
    – mpdonadio
    Jan 18, 2013 at 11:58

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.