Skip to content

backups: Don't leave services stopped if backup fails

  • We stop services before backup and restart them when backup is completed. However, if backup fails, we are not restarting the services. With this change, ensure that stopped services are restarted even if backup process fails.

  • Similarly for restore operation.

Tests:

  • Backup and restore of an app work.

  • Functional tests for matrix-synapse work.

  • Run the following two tests without the patch to ensure that the reported bug is reproducible.

  • Make a backup operation fail by raising an exception in the privileged code that takes backup. Enable matrix-synapse app. Run backup including the matrix-synapse app. Backup fails and shows an error. The service is stopped before backup and restarted after backup failure.

  • Make a restore operation fail by raising an exception in the privileged code that does restore. Enable matrix-synapse app. Run backup including the matrix-synapse app and try to restore it. Restore fails and shows an error. The service is stopped before restore and restarted after restore failure.

Signed-off-by: Sunil Mohan Adapa sunil@medhas.org

Merge request reports

Loading