From 9ab81e461ecd8a17b6a25a5b25c5a06060e5accf Mon Sep 17 00:00:00 2001 From: Manu Date: Wed, 9 Jul 2025 18:33:43 +0100 Subject: [PATCH 1/4] Support for RHEL10 --- vars/RedHat-10.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 vars/RedHat-10.yml diff --git a/vars/RedHat-10.yml b/vars/RedHat-10.yml new file mode 100644 index 0000000..9949331 --- /dev/null +++ b/vars/RedHat-10.yml @@ -0,0 +1,28 @@ +--- +borg_dep_packages: + - openssh-clients + +borg_cron_package: cronie + +borg_pip_packages: + - gcc + - gcc-c++ + - libacl + - libacl-devel + - libzstd-devel + - lz4-devel + - openssl-devel + # - python3-devel + - python3-pip + - python3-setuptools + - xxhash + - xxhash-devel + # - python3-virtualenv + # - python3-wheel + +borg_distro_packages: + - borgbackup + - borgmatic + +python_bin: python3 +pip_bin: pip3 From e3397c62f7eef254fcc8b46c15440c46f0378b2b Mon Sep 17 00:00:00 2001 From: Bert-Jan Fikse Date: Tue, 3 Jun 2025 17:13:55 +0200 Subject: [PATCH 2/4] fix: use path as key for repositories config --- templates/config.yaml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index accbc87..4f45173 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -19,10 +19,10 @@ location: repositories: {% if borg_repository is iterable and (borg_repository is not string and borg_repository is not mapping) %} {% for repo in borg_repository %} - - {{ repo }} + - path: {{ repo }} {% endfor %} {% elif borg_repository is defined and borg_repository is string %} - - {{ borg_repository }} + - path: {{ borg_repository }} {% endif %} # Store atime into archive. From 0dd2f880331f06827cb9849e60a2be1ce711089b Mon Sep 17 00:00:00 2001 From: AJ Jordan Date: Sun, 30 Mar 2025 04:34:38 -0400 Subject: [PATCH 3/4] Add `none` installation method --- README.md | 2 +- meta/argument_specs.yml | 1 + tasks/01_install.yml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index edb3336..61e36b8 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ $ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/ansibl - `borg_encryption_passphrase`: Password to use for repokey or keyfile. Empty if repo is unencrypted. - `borg_exclude_from`: Read exclude patterns from one or more separate named files, one pattern per line. - `borg_exclude_patterns`: Paths or patterns to exclude from backup. See [official documentation](https://borgbackup.readthedocs.io/en/stable/usage/help.html#borg-help-patterns) for more. -- `borg_install_method`: By default `pip` is used to install borgmatic. To install via your distributions package manager set this to `package` and (if needed) overwrite the `borg_distro_packages` variable to contain your distributions package names required to install borgmatic. Note that many distributions ship outdated versions of borgbackup and borgmatic; use at your own risk. +- `borg_install_method`: By default `pip` is used to install borgmatic. To install via your distributions package manager set this to `package` and (if needed) overwrite the `borg_distro_packages` variable to contain your distributions package names required to install borgmatic. Note that many distributions ship outdated versions of borgbackup and borgmatic; use at your own risk. `none` completely disables installation management. - `borg_require_epel`: When using `borg_install_method: package` on RHEL-based distributions, the EPEL repo is required. To disable the check (e.g. when using a custom mirror instead of the `epel-release` package), set this to `false`. Defaults to `{{ ansible_os_family == 'RedHat' and ansible_distribution != 'Fedora' }}` (i.e. `true` on Enterprise Linux-based distros). - `borg_lock_wait_time`: Config maximum seconds to wait for acquiring a repository/cache lock. Defaults to 5 seconds. - `borg_one_file_system`: Don't cross file-system boundaries. Defaults to `true` diff --git a/meta/argument_specs.yml b/meta/argument_specs.yml index b668fe9..6a7df89 100644 --- a/meta/argument_specs.yml +++ b/meta/argument_specs.yml @@ -36,6 +36,7 @@ argument_specs: overwrite the borg_distro_packages variable to contain your distributions package names required to install borgmatic. Note that many distributions ship outdated versions of borgbackup and borgmatic; use at your own risk. + Set to none to disable installation management. borgmatic_config_name: type: str required: false diff --git a/tasks/01_install.yml b/tasks/01_install.yml index 83896fc..ac5357c 100644 --- a/tasks/01_install.yml +++ b/tasks/01_install.yml @@ -1,5 +1,6 @@ --- - name: Install borgbackup + when: borg_install_method != "none" block: - name: Include OS-specific variables include_vars: "{{ item }}" From 4faab60075be2adf125f5eba732dd8e0e25d8300 Mon Sep 17 00:00:00 2001 From: Nish_ <120EE0980@nitrkl.ac.in> Date: Wed, 12 Mar 2025 17:53:35 +0530 Subject: [PATCH 4/4] add option borgmatic_unknown_unencrypted_repo_access_is_ok Signed-off-by: Nish_ <120EE0980@nitrkl.ac.in> --- README.md | 1 + defaults/main.yml | 1 + meta/argument_specs.yml | 3 +++ templates/config.yaml.j2 | 3 +++ 4 files changed, 8 insertions(+) diff --git a/README.md b/README.md index 61e36b8..ae15e9b 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,7 @@ $ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/ansibl - `borgmatic_hooks`: Hooks to monitor your backups e.g. with [Healthchecks](https://healthchecks.io/). See [official documentation](https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/) for more. - `borgmatic_timer`: If the variable is set, a timer is installed. A choice must be made between `cron` and `systemd`. - `borgmatic_relocated_repo_access_is_ok`: Bypass Borg error about a repository that has been moved. Defaults to `false` +- `borgmatic_unknown_unencrypted_repo_access_is_ok`: Bypass Borg error about a previously unknown unencrypted repository. Defaults to `false` - `borgmatic_store_atime`: Store atime into archive. Defaults to `true` - `borgmatic_store_ctime`: Store ctime into archive. Defaults to `true` - `borgmatic_version`: Force a specific borgmatic version to be installed diff --git a/defaults/main.yml b/defaults/main.yml index b3e5872..ad45b45 100755 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -43,6 +43,7 @@ borgmatic_check_last: 3 borgmatic_store_atime: true borgmatic_store_ctime: true borgmatic_relocated_repo_access_is_ok: false +borgmatic_unknown_unencrypted_repo_access_is_ok: false borgmatic_version: ">=1.7.11" borg_venv_path: "/opt/borgmatic" diff --git a/meta/argument_specs.yml b/meta/argument_specs.yml index 6a7df89..e074e45 100644 --- a/meta/argument_specs.yml +++ b/meta/argument_specs.yml @@ -115,6 +115,9 @@ argument_specs: borgmatic_relocated_repo_access_is_ok: type: bool description: Bypass Borg error about a repository that has been moved. + borgmatic_unknown_unencrypted_repo_access_is_ok: + type: bool + description: Bypass Borg error about a previously unknown unencrypted repository. borg_retention_policy: type: dict description: Define the pruning policy diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index 4f45173..61d6615 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -112,6 +112,9 @@ storage: # Bypass Borg error about a repository that has been moved. relocated_repo_access_is_ok: {{ borgmatic_relocated_repo_access_is_ok }} + # Bypass Borg error about a previously unknown unencrypted repository. + unknown_unencrypted_repo_access_is_ok: {{ borgmatic_unknown_unencrypted_repo_access_is_ok }} + # Retention policy for how many backups to keep in each category. See # https://borgbackup.readthedocs.org/en/stable/usage.html#borg-prune for details. # At least one of the "keep" options is required for pruning to work.