From 06232efe2838547837f06ba8312e5154beb094f9 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 6 Apr 2021 20:56:43 +0200 Subject: [PATCH] Fix datadir restore --- scripts/restore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/restore b/scripts/restore index c9d132c..44d0e13 100755 --- a/scripts/restore +++ b/scripts/restore @@ -91,6 +91,9 @@ chown -R "$app":"$app" "$final_path" #================================================= ynh_script_progression --message="Recreating the data directory..." +# Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup. +ynh_restore_file --origin_path="$datadir" --not_mandatory + # Create app folders mkdir -p "$datadir/" mkdir -p "$datadir/uploads/" @@ -100,8 +103,6 @@ mkdir -p "$datadir/static/emoji/" # Give permission to the datadir chown -R "$app":"$app" "$datadir" -ynh_app_setting_set --app=$app --key=datadir --value="$datadir" - #================================================= # RESTORE THE CONFIG FILE #=================================================