diff --git a/conf/backup-with-borg.j2 b/conf/backup-with-borg.j2 index d2b9f1b..347cdb4 100644 --- a/conf/backup-with-borg.j2 +++ b/conf/backup-with-borg.j2 @@ -30,7 +30,14 @@ fi # Backup all apps independently apps=$(yunohost app setting {{ app }} apps) for app in $(yunohost app list --installed -b | grep id: | cut -d: -f2); do - if [[ "$apps" = *"$app,"* ]] || [ "$apps" = "all" ]; then + backup_app=false + for selected_app in $(echo $apps | tr "," " ");do + if [[ "$selected_app" == "$app" ]] || [ "$apps" = "all" ]; then + backup_app=true + break + fi + done + if [ "$backup_app" == "true" ];then yunohost backup create $ignore_system -n auto_$app --method {{ app }}_app --apps $app fi done