backup-automation/full-backup.sh
ZoopaMario 5f06ae081d
Some checks failed
Lint Bash Scripts / lint-bash (push) Failing after 27s
Refactor code base focusing on extendability
- Add a library file containing common logic to be sourced by individual backup scripts
- Integrate logger file as it so far only contained a single method
- Make sure all relevant variables are defined within the related .env file
- Remove the option to pass command line  arguments to the script
2024-12-30 08:41:58 +01:00

20 lines
481 B
Bash
Executable file

#!/bin/bash
SCRIPT_ABS_LOCATION=$(realpath "$(dirname "${0}")")
# Define an array of application names
declare -a apps=("cryptpad" "immich" "duplicati" "nextcloud" "vaultwarden" "forgejo" "portainer")
# Function to execute the backup script for each application
backup_app() {
local app=$1
"$SCRIPT_ABS_LOCATION/$app/$app-backup.sh"
}
# Iterate over each app in the array and call the backup function
for app in "${apps[@]}"; do
backup_app "$app"
sleep 5
done