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.
securedrop-admin backupsecuredrop-admin restoreThe application should be operational.
The source and journalist interfaces return error 500s.
Running sudo dpkg-reconfigure securedrop-app-code calls the postinst script which will apply migration. Based on my testing, this seems to work reliably.
Using dpkg-reconfigure is the best choice because it means we keep the upgrade/migration logic in one place.
Most helpful comment
Using
dpkg-reconfigureis the best choice because it means we keep the upgrade/migration logic in one place.