From 55864be3f05ba596fdbf7bc78a591ed8d8a8e27c Mon Sep 17 00:00:00 2001 From: Hannes Braun <hannes.braun@slub-dresden.de> Date: Tue, 9 Aug 2022 09:58:47 +0200 Subject: [PATCH] Extended .gitignore for *.swp files. README.md updated. --- .gitignore | 1 + README.md | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d344ba6..1e3fdf0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ config.json +*.swp diff --git a/README.md b/README.md index be8f661..21a02cc 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ to the appropriate path. The backup script needs an SQL User, capable to lock and dump the databases, which should be backuped. In the standard configuration, the script trys to backup every single database on the server "localhost", using the user "root" without a password. This will most probably result in an error. See further on the Step -[Configuration](#Configuration). +[Configuration](Configuration). ## Developing @@ -37,16 +37,21 @@ cd sql-backup ## Configuration -The script needs the following variables to work. Therefor a file named 'config.json' is loaded. If the file does not exist, a standard configuration will be loaded. +The script needs the following variables to work. Therefor a file named 'config.json' is loaded. If the file +does not exist, a standard configuration will be loaded. | Variable type | variable name | default Value | |-----------------------|------------------|-------------------| | SQL Server Hostname | sqlHost | localhost | | SQL Server Port | sqlPort | 3306 | | User used to connect | sqlUser | root | -| List of Databases | dbNames | ($(mysql -u $sqlUser -e "SHOW DATABASES;")) | +| User Password | sqlPass | null | +| List of Databases | dbNames | all | | Backup Root Directory | backupRoot | /var/backups/sql/ | | Days to keep Backups | backupRetainDays | 30 | +| Rsync Destination | rsyncDest | null | + +Rsync destination can only lead to a 'local' directory. To use an offsite destination, mount it via system. ## Contributing -- GitLab