diff --git a/scripts/upgrade b/scripts/upgrade index c06b1bd..fdbb2ad 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -47,6 +47,15 @@ fi # Normalize the URL path syntax path_url=$(ynh_normalize_url_path $path_url) +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # STANDARD UPGRADE STEPS #=================================================