diff --git a/config.json b/config.json
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..825cf44fe47512317a59540379e175662dfe548a 100644
--- a/config.json
+++ b/config.json
@@ -0,0 +1,11 @@
+[
+  {
+    "sqlHost": "localhost",
+    "sqlPort": "3306",
+    "sqlUser": "root",
+    "sqlPass": null,
+    "dbNames": "all",
+    "backupRoot": "/var/backups/sql1/",
+    "backupRetainDays": 30
+  }
+]
diff --git a/config_template.json b/config_template.json
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..348bf917f2a1b011e19523e8f5a3c2bf88685980 100644
--- a/config_template.json
+++ b/config_template.json
@@ -0,0 +1,11 @@
+[
+  {
+    "sqlHost": "localhost",
+    "sqlPort": "3306",
+    "sqlUser": "root",
+    "sqlPass": null,
+    "dbNames": "all",
+    "backupRoot": "/var/backups/sql/",
+    "backupRetainDays": 30
+  }
+]
diff --git a/sql-backup-sample.conf b/sql-backup-sample.conf
deleted file mode 100644
index 5cc4c1256559221f753d2921e45455d8935fefb4..0000000000000000000000000000000000000000
--- a/sql-backup-sample.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-	"sqlHost": "localhost",
-	"sqlPort": "3306",
-	"sqlUser": "root",
-	"sqlPass": null,
-	"dbNames": "all",
-	"backupRoot": "/var/backups/sql/",
-	"backupRetainDays": 30
-}
diff --git a/sql-backup.conf b/sql-backup.conf
deleted file mode 100644
index edd87294287028b28ca80cd9b62b6846d6b59f85..0000000000000000000000000000000000000000
--- a/sql-backup.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-{
-	"sqlHost": "localhost",
-	"sqlPort": "3306",
-	"sqlUser": "backup",
-	"sqlPass": "l)m0h4vtJ@D7*f5YOvLO5c=0g?4K3aEM",
-	"dbNames": "all",
-	"backupRoot": "/var/backups/sql/",
-	"backupRetainDays": 30
-}
diff --git a/sql-backup.py b/sql-backup.py
deleted file mode 100755
index 07de054136d4d5f7a9f3adbe1300020fa3cf3de6..0000000000000000000000000000000000000000
--- a/sql-backup.py
+++ /dev/null
@@ -1,52 +0,0 @@
-import os
-import json
-import subprocess
-import mysql.connector
-
-#########################
-###                   ###
-###     SETTINGS      ###
-###                   ###
-#########################
-
-try:
-	configFile = open('/opt/sql-backup/sql-backup.conf')
-	print('INFO: File exists, load it --> To be implemented')
-except:
-	print('WARN: No configuration file found. Attempting to backup all existing Databases as root.')
-	configFile = open('/opt/sql-backup/sql-backup-sample.conf')
-
-config = json.load(configFile)
-configFile.close()
-
-sqlHost = config['sqlHost']
-sqlPort = config['sqlPort']
-sqlUser = config['sqlUser']
-sqlPass = config['sqlPass']
-dbNames = config['dbNames']
-backupRoot = config['backupRoot']
-backupRetainDays = config['backupRetainDays']
-
-#########################
-###                   ###
-###  START OF SCRIPT  ###
-###                   ###
-#########################
-
-isDir = os.path.isdir(backupRoot)
-if isDir == False:
-	print('WARN: Backup root directory does not exist. Try to create it.')
-	try:
-		os.mkdir(backupRoot)
-	except:
-		print('ERROR: Could not create backup root directory. Stopping backup process')
-		quit()
-
-connection = mysql.connector.connect(host = sqlHost, port = sqlPort,
-	user = sqlUser, password = sqlPass)
-cursor = connection.cursor()
-cursor.execute('SHOW DATABASES;')
-dbNames = []
-for record in cursor.fetchall():
-	dbNames.append(record[0])
-print(dbNames)
diff --git a/sql-backup.sh b/sql-backup.sh
index 2250c84cb5423e850b61a830ed9e5be501978d54..6f06180f0deb7a60bf80a8c986ae5769be44ca63 100755
--- a/sql-backup.sh
+++ b/sql-backup.sh
@@ -8,20 +8,36 @@ set -o nounset                              # Treat unset variables as an error
 #########################
 
 export PATH=/bin:/usr/bin:/usr/local/bin
+configFile=/opt/sql-backup/config.json
+configTemplate=/opt/sql-backup/config_template.json
 
-configFile=/etc/sql-backup/sql-backup.conf
-if test -f "configFile"; then
-  echo "INFO: Config file exists, load it --> To be implemented"
-else
-  echo "WARN: No configuration file found. Attempting to backup all existing Databases as root."
-  sqlHost="localhost"
-  sqlPort="3306"
-  sqlUser="root"
-  sqlPass=""
-  dbNames=($(mysql -u root -e "SHOW DATABASES;"))
-  backupRoot="/var/backups/sql/"
-  backupRetainDays=30
+if [[ ! -f $configFile ]]; then
+  echo 'WARN: No configuration file found. Generate file from template.'
+  if [[ ! -f $configTemplate ]]; then
+    echo 'ERROR: No configuration template found. Installation might be corrupted. Please run update.sh or' \
+         'reclone repository.'
+    exit 1
+  else
+    cp $configTemplate $configFile
+  fi
 fi
+
+echo 'INFO: Load config file.'
+sqlHost=$(cat $configFile | jq -r '.[0].sqlHost')
+sqlPort=$(cat $configFile | jq -r '.[0].sqlPort')
+sqlUser=$(cat $configFile | jq -r '.[0].sqlUser')
+sqlPass=$(cat $configFile | jq -r '.[0].sqlPass')
+dbNames=$(cat $configFile | jq -r '.[0].dbNames')
+if [ $dbNames == 'all' ]; then
+  if [ -z $sqlPass ]; then
+    dbNames=($(mysql -h$sqlHost -P$sqlPort -u$sqlUser -e "SHOW DATABASES;" -s --skip-column-names))
+  else
+    dbNames=($(mysql -h$sqlHost -P$sqlPort -u$sqlUser -p$sqlPass -e "SHOW DATABASES;" -s --skip-column-names))
+  fi
+fi
+backupRoot=$(cat $configFile | jq -r '.[0].backupRoot')
+backupRetainDays=$(cat $configFile | jq -r '.[0].backupRetainDays')
+
 today=$(date +"%y%m%d")
 
 #########################
@@ -44,22 +60,18 @@ else
   }
 fi
 
-
 for dbName in "${dbNames[@]}";
 do
 
-  if [ $dbName == "Database" ] || \
-     [ $dbName == "information_schema" ] || \
-     [ $dbName == "mysql" ] || \
-     [ $dbName == "performance_schema" ] || \
-     [ $dbName == "phpmyadmin" ];
-  then
+  if [ $dbName == 'information_schema' ] || \
+     [ $dbName == 'performance_schema' ] || \
+     [ $dbName == 'mysql' ] || \
+     [ $dbName == 'phpmyadmin' ]; then
     continue
   fi
 
   backupPath=$backupRoot$dbName
   mkdir -p ${backupPath}
-  cd $backupPath
 
   if [ -z $sqlPass ];
   then
@@ -81,7 +93,7 @@ do
     delDate=$(date +"%y%m%d" --date="${backupRetainDays} days ago")
     delFile=${dbName}-${delDate}.sql
 
-    for f in *; do
+    for f in $backupPath/*; do
       if [[ "$f" < "$delFile" ]]; then
         echo "delete $f"
         rm -f $f