There are 2 required values in the jobs/backup.job
```text
dir-localdumps = /var/iml-backup
dir-localdumps = /var/iml-backup/backup
keep-days = 7
```
...
...
@@ -11,21 +13,139 @@ This defines the backup target for sql dumps and how long they will be kept loca
There is an optional value to define the target directory for archived dumps. This value is used for couchdb2 only.
`dir-dbarchive = /var/localdumps/archive`
`dir-dbarchive = /var/iml-backup/archive`
see [backup.job](50_File_backup.job.md)
## Profiles
In the folder plugins/localdump/profiles/ are several ini files.
They describe a database environment by the [detect] section.
If a profile matches then a database will be dumped or restored.
For the detection you can verify
* existing files
* running processes
* open tcp port
* localhost or a remote system
* on a local machine (if no hostname is given) you can check the process using this port
After installation there are some ini files that contain a common
### File names
File convention: `<DBTYPE>_<PROFILE>.ini`
*<DBTYPE> must match a database dumper in plugins/localdump/ without extension ".sh"
*<DBTYPE>_<PROFILE> is the target folder to store backups.
*<PROFILE> is a custom name to
* _<PROFILE> can be empty to mark a local database of the given type.
### Detect
To detect the existance of you can use the following keys. If all found detect entries match it is counted as detected.
| Key | Type | Description |
|--- |--- |--- |
| binary | string | Binary that must be found in path. Use comma to separate multiple binaries.
| file[] | string | full path of a file. It must match "type". It can be given multiple times.
| process | regex | A binary to be matched in the process list
| tcp | integer | A tcp port number that must be in use
| tcp-process | regex | A process name offering the local tcp port (regex for last column in `netstat -tulpen`). If process names can differ depending on an os use a pipe to set alternatives eg `postgres|postmaster`
| tcp-target | string | A hostname for tcp port check, eg localhost
| type | regex | a matching regex for `file -b FILE | grep -i REGEX; see "file[]"`