diff --git a/.gitignore b/.gitignore index d344ba6b06cb4611d3a27589d8f48b22c832b048..1e3fdf0527042e920dadb511a6a605cad9408f6a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ config.json +*.swp diff --git a/README.md b/README.md index be8f661bce474175d2b729324c4bc6e0df843e42..21a02cc61b0a813e317b409fb27acc227c507487 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