Commit a07ba761 authored by root's avatar root

Fixed bug in post processing script.

- Delete debug output from restore if restore was successful.
parent ac095a3a
...@@ -87,6 +87,8 @@ function restore_influx() ...@@ -87,6 +87,8 @@ function restore_influx()
error_text=`egrep -i "error|failed" $DEBUG_PATH | grep -v "Failed "` error_text=`egrep -i "error|failed" $DEBUG_PATH | grep -v "Failed "`
if [ ${#error_text} -eq 0 ]; then if [ ${#error_text} -eq 0 ]; then
mysql_command "UPDATE Backup SET restored=1 WHERE shard_id=${shard_id} AND start=${start_seconds};" mysql_command "UPDATE Backup SET restored=1 WHERE shard_id=${shard_id} AND start=${start_seconds};"
# delete debug output
echo -e "Backup and restore finished sucessfully." 2>&1 | tee $DEBUG_PATH
fi fi
i=$(( $i + 2 )) i=$(( $i + 2 ))
done done
...@@ -254,4 +256,5 @@ else ...@@ -254,4 +256,5 @@ else
echo "$1 is not supported." echo "$1 is not supported."
;; ;;
esac esac
fi fi
\ No newline at end of file
Markdown is supported
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