diff --git a/README.md b/README.md index 7f80852..8a49220 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,12 @@ This following command will enable the admin access to the specified user : su --command="psql matrix_synapse" postgres <<< "UPDATE users SET admin = 1 WHERE name = '@user_to_be_admin:domain.tld'" ``` +### Disable backup in upgrade + +To solve the issue [#30](https://github.com/YunoHost-Apps/synapse_ynh/issues/30) you can disable the upgrade in the upgrade by setting to true the key `disable_backup_before_upgrade` in the app setting. You can set it by this command : + +`yunohost app setting synapse disable_backup_before_upgrade -v 1` + Migration from old package -------------------------- diff --git a/scripts/upgrade b/scripts/upgrade index 50fb4f2..d73276e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,10 +30,13 @@ fi systemctl stop matrix-synapse.service -ynh_backup_before_upgrade -ynh_clean_setup () { - ynh_restore_upgradebackup -} +if [[ $(ynh_app_setting_get $app disable_backup_before_upgrade) != '1' ]] +then + ynh_backup_before_upgrade + ynh_clean_setup () { + ynh_restore_upgradebackup + } +fi ynh_abort_if_errors