Verified Commit 0d6f023a authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

backup-mysql: ensure rm path never expands to /*

parent 73a48d43
Pipeline #5944 passed with stage
in 45 seconds
......@@ -4,5 +4,5 @@ mysql_opts="--defaults-file={{mysql_backup_defaults}}"
backupdir="{{mysql_backup_dir}}"
[[ ! -d "$backupdir" ]] && mkdir -p "$backupdir"
rm -rf "$backupdir"/*
rm -rf "${backupdir:?}"/*
mariabackup $mysql_opts --backup --target-dir="$backupdir"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment