Skip to content

Commit

Permalink
Merge pull request #21 from adfinis/feat/jobs/max_full_interval
Browse files Browse the repository at this point in the history
feat(jobs): max full/diff interval settings
  • Loading branch information
adf-patrickha authored Feb 14, 2025
2 parents 7d2677e + 7a365e0 commit 27c9e0e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
9 changes: 9 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@
write_bootstrap: '|/usr/bin/bsmtp -h localhost -f \"\(Bareos\) \" -s \"Bootstrap for Job %j\" root'
priority: 11
maximum_concurrent_jobs: 2
- name: BackupMaxSettings
jobdefs: DefaultJob
level: incremental
max_full_interval: 5 days
max_diff_interval: 3 days
max_run_sched: 2 hours
max_run_time: 5 hours
max_wait_time: 10 hours

bareos_dir_messages:
- name: "Standard"
description: "Send relevant messages to the Director."
Expand Down
20 changes: 18 additions & 2 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
---
- name: Verify
hosts: all
become: yes
gather_facts: no
become: true
gather_facts: false
pre_tasks:
- name: Install psycopg dependency community.postgresql
ansible.builtin.package:
name: python3-psycopg2
state: present

tasks:
- name: Check if port 9101 is listening
Expand Down Expand Up @@ -34,3 +39,14 @@
diff: true
register: _result
failed_when: _result.changed

- name: Verify PSQL access to Catalog database
community.postgresql.postgresql_info:
db: bareos
login_user: bareos
filter: version
become: true
become_user: bareos
register: _psql_result
failed_when:
- '"postgresql" not in _psql_result.version.raw | lower'
6 changes: 6 additions & 0 deletions templates/job.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@
{% if item.backup_format is defined %}
Backup Format = {{ item.backup_format }}
{% endif %}
{% if item.max_full_interval is defined %}
Max Full Interval = {{ item.max_full_interval }}
{% endif %}
{% if item.max_diff_interval is defined %}
Max Diff Interval = {{ item.max_diff_interval }}
{% endif %}
{% if item.max_run_sched_time is defined %}
Max Run Sched Time = {{ item.max_run_sched_time }}
{% endif %}
Expand Down

0 comments on commit 27c9e0e

Please sign in to comment.