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 #=================================================