From 7e4b3c678cc1626ca3eca6b0971be70e74682147 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 8 Oct 2020 01:33:09 +0200 Subject: [PATCH] Implement backup_core_only --- scripts/upgrade | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index 547fa0c..c16f112 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -73,8 +73,16 @@ ynh_secure_remove --file="/etc/apt/sources.list.d/yarn.list" #================================================= ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." +# Inform the backup/restore process that it should not save the data directory +# Use only for the previous backup script that doesn't set 'is_big' +ynh_app_setting_set --app=$app --key=backup_core_only --value=1 + # Backup the current version of the app ynh_backup_before_upgrade + +# Remove the option backup_core_only after the backup. +ynh_app_setting_delete --app=$app --key=backup_core_only + ynh_clean_setup () { # restore it if the upgrade fails ynh_clean_check_starting