#!/usr/bin/env sh set -e . /app/setup.sh mkdir -p /backup/sqlDump for db in $(echo "$MYSQL_DUMP_DB" | sed 's/,/\n/g') do echo "Dumping db: $db" mysqldump --compact -P 3306 --host "$MYSQL_HOST" -u "$MYSQL_USERNAME" "-p$MYSQL_PASSWORD_ACTUAL" "$db" > "/backup/sqlDump/$db.sql" done restic --verbose backup "/backup"