Ressurecting my Old One Name Study Drupal Site

Submitted by admin on Sat, 01/21/2017 - 09:24
Drupal logo

A few years back I tried out running a Drupal site on an AWS instance for my One Name Study. Things went pretty well until I made the mistake of doing an update of the Ubuntu Server without first taking a snapshot or backup. I made a couple of attempts to resurrect it, but ran into all sorts of problems with the old snapshots, versions of software, and a few bugs where advertised work-arounds did not work for me. Eventually, the Guild of One Name Studies announced that it was possible to create a Drupal website on their hosted Members Website Project. This blog is the story of the resurrection of my old site. You can see the results here (you are reading from the results!). I hope the notes might be useful to someone. Unfortunately, my memory is already a little sketchy of the exact steps.

The Starting conditions:

  • A blank Drupal 8 website prepared on the Guild of One Name Studies Members Website Project.
  • Various non-running (not working) instances of my old Bitnami Ubuntu 12.04 Stack on Amazon AWS (after a couple of failed attempts to fix them years ago).
  • Various old snapshots of the AWS image originally taken for backup purposes.
  • A local copy of an SQL export of the drupal database which was exported using PhpMyAdmin some time when the instance was still working.

Steps taken to get going again

  1. After a little bit of research, I decided to use DrupalVM to test out the process and prove I could get it up and running before going live on the Member Website Project site. Based on the date of the local SQL database backup, it seemed worth using that because the AWS snapshots did not appear to be significantly more recent. And this avoided needing to get an AWS instance up and running.
  2. At first I had a few problems getting the DrupalVM machine up and running, as I wanted Drupal 7 (as that was the version of the original site), and my version of Vagrant and Ansible was too old. But after some help from the DrupalVM developers, and switching DrupalVM to Drush instead of Composer, I managed to get the Virtual Machine up and running in a blank state (no content).
  3. In order to clear the DrupalVM database, I ran $ drush @drupalvm.dev sql-drop.
  4. Imported the backup SQL database using $ drush @drupalvm.dev sql-cli < ~/DrupalBackup/bitnami_drupal7.sql. Success! I could now see all my old content, but the site looked very plain without a theme. This was easily fixed by logging in using my old admin password and selecting the theme and clour settings that best matched my memory of what the site looked like. It was then that I realised that I needed to resurrect the AWS instance in order to extract all the images that were part of the original site.
  5. Getting the AWS instance up and running from the last snapshot was a bit tricky. I needed to search for the AWS image with right kernel for the Ubuntu Server image to successfully boot.
  6. Then I was able to ssh into the old Ubuntu 12.04 server again.
  7. Once I knew I could access the machine, I used scp to copy the files from the directory containing the images/photos, and then copy them to the correct drupalVM Drupal directory. Now I had the Drupal site back up and running in DupalVM and looking like it used to.
  8. As the target site was Drupal 8, I played around with migrating from Drupal 7 to Drupal 8 in the VM and investigating various backup and migration tools. Unfortunately, I ran into "version dependency hell"! Also, it looked like it was going to be difficult to upload the content from the VM to the new site as I did not have ssh access and therefore no possibility of using drush.
  9. So, I decided to set up a new structure (with an additional side menu based on a "places" Taxonomy) on the new Drupal 8 site, and recreated my only custom content type (the Family Group pages) manually. Copying and pasting the text content from DrupalVM manually also gave me the opportunity to correct spelling mistakes etc. and update links to the content from my blog at the same time.
  10. Next, I exported the latest data from my Gramps Gammon OneName tree using Navweb report and FTP'd it up the the new Drupal site. I had to create a htaccess file for the Navweb site so that it was visible outside of the Drupal main site.

So now the old site was up and running again in a new place. Yey! And by looking at the posts on my blog, I confirmed that I was only missing a small amount of content, which I was able to recreate easily enough from the information in Gramps. The next thing I need to do is start a regular backup process for the content. This is a fairly low priority though, as the GoONS website administrators deem to have their own backup system in place. I also plan to keep the Drupalvm site locally to test out any future structural changes to the site. Unfortunately, the new web hosting on the Members Website Project does not give me sufficient access to implement a Continuous Integration type of setup with Drupalvm. I hope this summary of the process and learning I went through is useful for someone.

Tags