Securedrop: SecureDrop backups from previous versions don't work if database migration has occurred

Created on 24 Aug 2018  路  1Comment  路  Source: freedomofpress/securedrop

Description

Backup restore (https://github.com/freedomofpress/securedrop/blob/develop/install_files/ansible-base/roles/restore/files/restore.py) script does not apply database migrations, and as such breaks the application upon backup restore. Manual workaround that appears to have no side-effects is to run sudo dpkg-reconfigure securedrop-app-code on the app server.

Steps to Reproduce

  1. Install SecureDrop 0.8.0
  2. securedrop-admin backup
  3. Upgrade to 0.9.0 (or higher)
  4. securedrop-admin restore
  5. Observe source and journalist interface return error 500

Expected Behavior

The application should be operational.

Actual Behavior

The source and journalist interfaces return error 500s.

Comments

Running sudo dpkg-reconfigure securedrop-app-code calls the postinst script which will apply migration. Based on my testing, this seems to work reliably.

Release bug

Most helpful comment

Using dpkg-reconfigure is the best choice because it means we keep the upgrade/migration logic in one place.

>All comments

Using dpkg-reconfigure is the best choice because it means we keep the upgrade/migration logic in one place.

Was this page helpful?
0 / 5 - 0 ratings