We have an installation of LimeSurvey to create surveys:

https://survey.tails.boum.org/

Infrastructure

Puppet configuration files:

Git repositories:

  • Upstream repo in https://github.com/LimeSurvey/LimeSurvey.git.

  • Updates repo in /var/lib/limesurvey/ which is synced automatically to the upstream repo.

  • Production repo in /var/www/limesurvey which has the update repo as origin.

Updating LimeSurvey

  1. Read the release notes:

    https://github.com/LimeSurvey/LimeSurvey/blob/master/docs/release_notes.txt.

  2. Connect to the platform:

    ssh 7vz7psas6zqqdszg.onion
    
  3. Update the backup of the database:

    sudo /usr/sbin/backupninja --now --debug --run /etc/backup.d/10.mysql
    
  4. Login as www-data:

    sudo -u www-data bash
    cd ~/limesurvey/
    
  5. Save a backup of the custom files in the working directory:

    tar zcvf /tmp/limesurvey-$(date +%Y-%m-%d-%H:%M).tgz application/config/config.php upload
    
  6. Fetch the changes from the updates repo:

    git fetch origin
    
  7. Check the version number in the production repo and the updates repo:

    git log master
    git log origin/master
    
  8. Merge the updates repo (or the upstream repo) into the production repo:

    git merge $TAG
    

    Remove all untracked files:

    git clean -df
    

    Restore the custom files:

    tar zxvf /tmp/limesurvey-$(date +%Y-%m-%d)-*.tgz
    
  9. Update the database:

    php application/commands/console.php updatedb
    
  10. Check the version in the footer of:

    https://survey.tails.boum.org/index.php/admin/index

    While doing so you might be prompted to apply database updates.

  11. Remove the backup of the custom files:

    rm /tmp/limesurvey-*.tgz