Skip to content
Snippets Groups Projects
Commit 55864be3 authored by Hannes Braun's avatar Hannes Braun :upside_down:
Browse files

Extended .gitignore for *.swp files. README.md updated.

parent 7eb792a7
No related branches found
No related tags found
No related merge requests found
config.json config.json
*.swp
...@@ -22,7 +22,7 @@ to the appropriate path. ...@@ -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. 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", 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 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 ## Developing
...@@ -37,16 +37,21 @@ cd sql-backup ...@@ -37,16 +37,21 @@ cd sql-backup
## Configuration ## 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 | | Variable type | variable name | default Value |
|-----------------------|------------------|-------------------| |-----------------------|------------------|-------------------|
| SQL Server Hostname | sqlHost | localhost | | SQL Server Hostname | sqlHost | localhost |
| SQL Server Port | sqlPort | 3306 | | SQL Server Port | sqlPort | 3306 |
| User used to connect | sqlUser | root | | 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/ | | Backup Root Directory | backupRoot | /var/backups/sql/ |
| Days to keep Backups | backupRetainDays | 30 | | 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 ## Contributing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment