Skip to content

Commit da1d298

Browse files
authored
Merge pull request #30 from mila-iqia/feat/filesets_allow_multiple_includes
feat: Allow to include multiple File path
2 parents fa822b5 + eac3da3 commit da1d298

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,22 @@ bareos_clients:
4242
bareos_filesets:
4343
- name: FilesetFoo
4444
description: "Backup Foo"
45-
include_file: /home/foo
46-
exclude_file:
45+
include_files:
46+
- /home/foo
47+
exclude_files:
4748
- /home/foo/bar
4849
```
4950

51+
> [!WARNING]
52+
> The `bareos_filesets[*].include_file` is deprecated and replaced by
53+
> `bareos_filesets[*].include_files` that allows to define a list of File path
54+
> to include.
55+
56+
> [!WARNING]
57+
> The `bareos_filesets[*].exclude_file` is deprecated and replaced by
58+
> `bareos_filesets[*].exclude_files` to reflect the ability to exclude a list
59+
> of File path.
60+
5061
- `bareos_pools`: List of pools in following format:
5162

5263
```

templates/bareos-dir/fileset/fileset.conf.j2

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ FileSet {
1818
}
1919
{% endfor %}
2020
{% endif %}
21+
{% if item.include_files is defined %}
22+
{% for include_file in item.include_files %}
23+
File = {{ include_file }}
24+
{% endfor %}
25+
{# item.include_file is deprecated #}
26+
{% else %}
2127
File = {{ item.include_file }}
28+
{% endif %}
2229
}
2330
# Things that usually have to be excluded
2431
# You have to exclude /var/lib/bareos/storage
@@ -27,9 +34,15 @@ FileSet {
2734
{% for file in bareos_excludes %}
2835
File = {{ file }}
2936
{% endfor %}
37+
{% if item.exclude_files is defined %}
38+
{% for exclude_file in item.exclude_files %}
39+
File = {{ exclude_file }}
40+
{% endfor %}
41+
{% endif %}
42+
{# item.exclude_file is deprecated #}
3043
{% if item.exclude_file is defined %}
31-
{% for line in item.exclude_file %}
32-
File = {{ line }}
44+
{% for exclude_file in item.exclude_file %}
45+
File = {{ exclude_file }}
3346
{% endfor %}
3447
{% endif %}
3548
}

0 commit comments

Comments
 (0)