diff --git a/src/freedombone-backup-local b/src/freedombone-backup-local index 68f93c6e..3aae2cd1 100755 --- a/src/freedombone-backup-local +++ b/src/freedombone-backup-local @@ -249,26 +249,6 @@ function backup_directories { done } -function backup_apps { - FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-* - - APPS_COMPLETED=() - - # for all the app scripts - for filename in $FILES - do - app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}') - if [[ $(item_in_array ${app_name} ${APPS_COMPLETED[@]}) != 0 ]]; then - function_check app_is_installed - if [[ "$(app_is_installed $a)" == "1" ]]; then - APPS_COMPLETED+=("${app_name}") - function_check backup_local_${app_name} - backup_local_${app_name} - fi - fi - done -} - function remove_backup_directory { if [ $1 ]; then if [[ $1 == "remove" ]]; then @@ -420,7 +400,7 @@ check_storage_space_remaining backup_users prepare_directories backup_directories -backup_apps +backup_apps local backup_configuration backup_admin_readme backup_mariadb diff --git a/src/freedombone-backup-remote b/src/freedombone-backup-remote index 619a4236..adc87fcd 100755 --- a/src/freedombone-backup-remote +++ b/src/freedombone-backup-remote @@ -424,8 +424,7 @@ if [[ $TEST_MODE == "no" ]]; then backup_mariadb backup_certs backup_mailing_list - - + backup_apps remote backup_extra_directories fi diff --git a/src/freedombone-utils-backup b/src/freedombone-utils-backup index eca9f5cb..30590ef2 100755 --- a/src/freedombone-utils-backup +++ b/src/freedombone-utils-backup @@ -363,4 +363,23 @@ function backup_database_to_friend { backup_directory_to_friend /root/temp${database_name}data ${database_name}data } +function backup_apps { + localremote=$1 + FILES=/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-* + + BACKUP_APPS_COMPLETED=() + + # for all the app scripts + for filename in $FILES + do + app_name=$(echo "${filename}" | awk -F '-app-' '{print $2}') + if [[ $(item_in_array ${app_name} ${BACKUP_APPS_COMPLETED[@]}) != 0 ]]; then + if [[ "$(app_is_installed $a)" == "1" ]]; then + BACKUP_APPS_COMPLETED+=("${app_name}") + backup_${localremote}_${app_name} + fi + fi + done +} + # NOTE: deliberately no exit 0