mirror of
				https://github.com/borgbase/ansible-role-borgbackup.git
				synced 2025-11-04 01:19:32 +01:00 
			
		
		
		
	Merge from upstream
This commit is contained in:
		
						commit
						86598f63d2
					
				@ -96,7 +96,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`
 | 
			
		||||
@ -122,6 +122,7 @@ $ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/ansibl
 | 
			
		||||
- `borgmatic_commands`: Invoke script before/after actions. See [How to add preparation and cleanup steps to backups](https://torsion.org/borgmatic/docs/how-to/add-preparation-and-cleanup-steps-to-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
 | 
			
		||||
 | 
			
		||||
@ -53,6 +53,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"
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
@ -114,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
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,6 @@
 | 
			
		||||
---
 | 
			
		||||
- name: Install borgbackup
 | 
			
		||||
  when: borg_install_method != "none"
 | 
			
		||||
  block:
 | 
			
		||||
    - name: Include OS-specific variables
 | 
			
		||||
      include_vars: "{{ item }}"
 | 
			
		||||
 | 
			
		||||
@ -18,12 +18,10 @@ one_file_system: {{ borg_one_file_system }}
 | 
			
		||||
repositories:
 | 
			
		||||
{% if borg_repository is iterable and (borg_repository is not string and borg_repository is not mapping) %}
 | 
			
		||||
  {% for repo in borg_repository %}
 | 
			
		||||
    - path: {{ repo }}
 | 
			
		||||
      encryption: repokey
 | 
			
		||||
        - path: {{ repo }}
 | 
			
		||||
  {% endfor %}
 | 
			
		||||
{% elif borg_repository is defined and borg_repository is string %}
 | 
			
		||||
    - path: {{ borg_repository }}
 | 
			
		||||
      encryption: repokey
 | 
			
		||||
        - path: {{ borg_repository }}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
# Store atime into archive.
 | 
			
		||||
@ -113,6 +111,9 @@ archive_name_format: '{hostname}-{now:%Y-%m-%d-%H%M%S}'
 | 
			
		||||
# 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.
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										28
									
								
								vars/RedHat-10.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								vars/RedHat-10.yml
									
									
									
									
									
										Normal file
									
								
							@ -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
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user