From 7c4866dd430cb5f89d4f3919a59b810cec274c23 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 19 Jun 2014 12:57:09 +1000 Subject: [PATCH] Fixed mysql when DB has no data --- scripts/tdp.mysql.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/tdp.mysql.sh b/scripts/tdp.mysql.sh index 7f3f3a9..9a1c4e6 100755 --- a/scripts/tdp.mysql.sh +++ b/scripts/tdp.mysql.sh @@ -96,6 +96,12 @@ listdb | while read db; do size=$(getsize $db); + # We need to skip this DB if it is empty + if [ -z "$size" ]; then + [ -n "$DEBUG" ] && echo "Skipping DB ($db), with no size ($size)" + continue + fi + [ -n "$DEBUG" ] && echo "Processing DB ($db), with size ($size)" # Backup to TSM