Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iml-backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
iml-backup
Merge requests
!129
Db Profiles
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Db Profiles
db-detector
into
master
Overview
0
Commits
63
Pipelines
0
Changes
5
Merged
Hahn Axel (hahn)
requested to merge
db-detector
into
master
1 year ago
Overview
0
Commits
63
Pipelines
0
Changes
5
0
0
Merge request reports
Compare
master
version 37
6e2facbf
1 year ago
version 36
65273a5f
1 year ago
version 35
67b5000f
1 year ago
version 34
7b9c90c4
1 year ago
version 33
23b22712
1 year ago
version 32
99ce1c42
1 year ago
version 31
f0b33915
1 year ago
version 30
2e9f8353
1 year ago
version 29
458ddfc0
1 year ago
version 28
56b798af
1 year ago
version 27
c9f05d74
1 year ago
version 26
aacf1076
1 year ago
version 25
86515e19
1 year ago
version 24
d38e687b
1 year ago
version 23
49ab3948
1 year ago
version 22
776851d8
1 year ago
version 21
b8307d35
1 year ago
version 20
f3c8405d
1 year ago
version 19
72e9e862
1 year ago
version 18
09bae785
1 year ago
version 17
b191c47d
1 year ago
version 16
5faf555a
1 year ago
version 15
e9d9dfde
1 year ago
version 14
c560568e
1 year ago
version 13
ffb7aae3
1 year ago
version 12
89542396
1 year ago
version 11
0c7f844b
1 year ago
version 10
a61ab713
1 year ago
version 9
1abfd8c1
1 year ago
version 8
13dc1dc4
1 year ago
version 7
71d4009c
1 year ago
version 6
df020468
1 year ago
version 5
3b1a63e7
1 year ago
version 4
d2ebb15c
1 year ago
version 3
0d715cf5
1 year ago
version 2
dbeae529
1 year ago
version 1
bbc8bb6b
1 year ago
master (base)
and
version 1
latest version
f2ada9a0
63 commits,
1 year ago
version 37
6e2facbf
62 commits,
1 year ago
version 36
65273a5f
59 commits,
1 year ago
version 35
67b5000f
52 commits,
1 year ago
version 34
7b9c90c4
51 commits,
1 year ago
version 33
23b22712
49 commits,
1 year ago
version 32
99ce1c42
48 commits,
1 year ago
version 31
f0b33915
47 commits,
1 year ago
version 30
2e9f8353
46 commits,
1 year ago
version 29
458ddfc0
45 commits,
1 year ago
version 28
56b798af
44 commits,
1 year ago
version 27
c9f05d74
43 commits,
1 year ago
version 26
aacf1076
42 commits,
1 year ago
version 25
86515e19
41 commits,
1 year ago
version 24
d38e687b
39 commits,
1 year ago
version 23
49ab3948
38 commits,
1 year ago
version 22
776851d8
37 commits,
1 year ago
version 21
b8307d35
36 commits,
1 year ago
version 20
f3c8405d
34 commits,
1 year ago
version 19
72e9e862
33 commits,
1 year ago
version 18
09bae785
32 commits,
1 year ago
version 17
b191c47d
29 commits,
1 year ago
version 16
5faf555a
28 commits,
1 year ago
version 15
e9d9dfde
25 commits,
1 year ago
version 14
c560568e
23 commits,
1 year ago
version 13
ffb7aae3
21 commits,
1 year ago
version 12
89542396
20 commits,
1 year ago
version 11
0c7f844b
19 commits,
1 year ago
version 10
a61ab713
17 commits,
1 year ago
version 9
1abfd8c1
16 commits,
1 year ago
version 8
13dc1dc4
14 commits,
1 year ago
version 7
71d4009c
13 commits,
1 year ago
version 6
df020468
12 commits,
1 year ago
version 5
3b1a63e7
11 commits,
1 year ago
version 4
d2ebb15c
10 commits,
1 year ago
version 3
0d715cf5
8 commits,
1 year ago
version 2
dbeae529
4 commits,
1 year ago
version 1
bbc8bb6b
3 commits,
1 year ago
5 files
+
469
−
159
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
plugins/localdump/profiles/readme.md
0 → 100644
+
83
−
0
View file @ bbc8bb6b
Edit in single-file editor
Open in Web IDE
# Database profiles
## Introduction
In this folder 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.
## 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 |
|--- |--- |--- |
| 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 match
| tcp-process | regex | A process name offering the local tcp port (regex for last column in netstat -tulpen)
| 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[]"
Example:
Mysql detection in a docker container:
```
ini
[detect]
process
=
'mysqld|mariadb'
tcp
=
13306
tcp-target
=
localhost
tcp-process
=
'rootlesskit'
```
Multiple Sqlite files
```
ini
[detect]
file
[]
=
"/home/axel/data/docker/ciserver/data/imldeployment/data/database/logs.db"
file
[]
=
"/home/axel/data/docker/ciserver/public_html/valuestore/data/versioncache.db"
type
=
"sqlite"
```
## Setter
If a profile detection was successful then values in the [set] section will be applied.
| Key | Type | Description |
|--- |--- |--- |
| su | string | User for su command; used for postgres
| dbuser | string | Database user; for replacement
| dbpassword | string | Password of database user; for replacement
| params | string | cli paramaters für dump / restore tools.
| env | string | extend environment with some variables, eg. export var1="something here". After backup/ restore this variables will be unset
Replacements that can be used for values
`params`
and
`env`
:
| Key | Description |
|--- |--- |
| {{tcp}} | value of [detect] -> tcp
| {{dbpassword}} | value of [set] -> dbpassword
| {{dbuser}} | value of [set] -> dbuser
| {{tcp-target}} | value of [detect] -> tcp-target
```
ini
[set]
su
=
''
dbuser
=
'root'
dbpassword
=
'12345678'
params
=
'--port={{tcp}} --password={{dbpassword}} --user={{dbuser}} --host={{tcp-target}}'
env
=
'export var1="happy meal"; export var2="new"; export var3="year!"'
```
Loading