Commit Graph

84 Commits

Author SHA1 Message Date
Dirk Sarpe
9a77705f28 use backports on debian 11 for package install 2023-05-26 11:50:50 +02:00
Manu
f5d7a0afb6
Update namespace (#129) 2023-05-16 08:07:46 +02:00
Manu
07c853663c
Set default minimum borgmatic version to match config format (#127) 2023-04-26 20:34:53 +01:00
Sam Hartsfield
7efeb1be5e
Fix failing on EPEL check in Fedora (#111)
* Fix failing on EPEL check in Fedora

Only applies when using the "package" install method.
Added a separate variable "borg_require_epel" to make it easy to disable
the check in any other situations (e.g. using a custom mirror instead of
the epel-release package).

* Explain default value of borg_require_epel
2023-04-19 11:07:29 +01:00
Manu
2f57fce727 Remove deprecated Borgmatic option. 2023-04-05 21:12:32 +01:00
Frank Dornheim
dd960dcf4e
Restructure role, add Systemd timer option. By @conloos (#112)
* add full path

* Update Readme.me: reorder optional Arguments, update cron -> systemd timer

* remove ssh_key_file; change cron to timer

* Removed cronie from package installation because systemd timer is used

* docker.sh - Stops all or selected containers to save the persistent data intact. The containers are started in reverse order

* Created arguments_specs.yml

* Role restructured:
  - if needed creation of a service user incl. creation of the ssh-key,
  - add the ssh key to authorized_keys,
  - auto init of the repos,
  - creation and start of systemd timer and services and
  - installation of the Docker helperscript.

* restructure role add import logic

* cleanup: user backup_user

* - "borg_source_directories" is not longer a required Argument
- add "borg_keys_directory" to load key from Service user during starting borgmatic by sudo

* Add borgmatic_initialization_repo (bool) as option to disable init of repo

* cleanup

* fix ansible-lint errors and warnings

* fix letter turner

* add option: borgmatic_timer

* add:
  - borgmatic_timer_systemd: true
readd:
  - borgmatic_cron_name: "borgmatic"

* - renamed borgmatic_cron_name to borgmatic_timer_cron_name to be more convergent.
- Change recommendations implemented by m3nu so that creation of a timer (systemd or cron) is optional and can be selected via borgmatic_timer.

* Add description to borgmatic_timer_cron_name and borgmatic_timer

* Add variable borg_cron_package to install the cron-packages in case of using timer: cron

* reworked timer install logic

* reworked timer install logic

* Add comments for running backup with service account

* add new parameters for tests

* Switch created to perform the backup as root or service account. If a service account is to be used, it will be created.

* Refactored: Check for ssh-key if not present, genereate them.

* Refactored

* Refactored

* renamed tasks/03_configure.yml to tasks/04_create_links_to_borg_and_borgmatic.yml

* Refactored

* Refactored

* add example for service account

* Update Python version for testing

* No auto init

* Add description to install_backup

* Add description to install_backup

* set coverage back to: m3nu.ansible_role_borgbackup

* The initialization of the repository must be activated and does not take place automatically.

* The initialization of the repository must be activated and does not take place automatically.

* Removed install_backup as var (bool) to prevent that this role run

* Rename backup_ssh_command to borg_ssh_command, tis was a double definition

* Renamed backup_repository to borg_repository and add better explanations

* remove copy ssh-keys and cert parts

* Add comments to borg_ssh_key_file and borg_ssh_key_type

* Set allways the borg_ssh_key_file and borg_ssh_command to load the right ssh-key. Add borg_ssh_key_type to select the key type by user

* Add borg_ssh_key_type

* renamed id_rsa to backup

* generate ssh-keys (backup and backup.pub) and add better explanation

* Print out key if borgmatic_initialization_repo is false

* Remove 'su - {{ borgbackup_user }} -c' to execute the borgmatic by the right user

* Add Check frequency, therefore, we no longer need to distinguish between normal and large repos

* Add link to Article

* renamed backup_ssh_command and backup_ssh_key_file to borg_ssh_command and borg_ssh_key_file

* Removed: borgmatic_initialization_repo

* Removed: borgmatic_initialization_repo

* Removed: borgmatic_initialization_repo

* revert changes

* Add Full Automation

* polishing

* rename backup.timer and bakup.service to borgmatic.timer and borgmatic.service

* remove debug

* Try to find services in ansible_facts

* Forgot to install Cron

* change borg_ssh_key_type to ed25519

* remove conditional checks

* - add hint to using a service user
- renamed: borg_ssh_key_file to borg_ssh_key_file_path
- removed advanced example

* add borg_ssh_key_name, renamed borg_ssh_key_file to borg_ssh_key_file_path

* removed static pointing to ~/.ssh/backup SSH private key

* Add README-Advanced-Examples.md for storing more examples

* Fix test idempotence

* Dont symlink when using distro packages

* Remove old test targets, consistent wording, remove tag

* Remove helper scripts, fix absolute path

* Fix cron job, add assert to prevent duplicate timers

* nit-pick

* Create bin links as root, no borg_ssh_command by default.

* Add breaking changes note to README

---------

Co-authored-by: Manu <manu@snapdragon.cc>
2023-03-28 18:01:12 +01:00
Stefan Morgenthaler
981d4f9072
Allow to installation via OS package manager or pip (#106)
* allow to installation via os package manager or pip

* Run a second time to install via package manager

* Check for EPEL if distro package requested.

* Split dep lists to avoid installing build deps when using distro pkg

Co-authored-by: Stefan Morgenthaler <dev@morgenthaler.at>
Co-authored-by: Manu <manu@snapdragon.cc>
2022-12-15 17:40:53 +01:00
e34f9311d8
Allow setting borg/borgmatic version (#107) 2022-11-22 20:54:31 +01:00
Manu
e1ba1d1364
Adjust Borgmatic arguments for v1.7.0 (#102) 2022-09-03 11:07:50 +02:00
Manuel Riel
1def545c86
Remove borgbase module, now separate (#100) 2022-05-13 11:17:47 +04:00
Luc Stroobant
740e9fe758
Upgrade pip and setuptools during installation. By @stroobl (#95) 2022-03-06 10:01:25 +04:00
Manu
8429ec5bc1
Support Borg 1.2.0 (#94)
* Move common Python packages to main.yml, install dependent Python packages first.
2022-02-28 10:28:37 +04:00
Manu
29d0c5f480
Unify all Borgmatic hooks in one variable (#93) 2022-02-20 14:42:09 +04:00
Manu
bb5b6afd4c
Add RHEL9 support, fix empty exclude option (#92) 2022-02-20 13:56:14 +04:00
Manu
4e376b4442
Use Python3 setuptools on Debian (#89) 2022-01-07 15:04:09 +04:00
michalroxorpl
aa5830aca0
Introduce support for Archlinux. By @michalroxorpl (#79) 2021-09-23 14:07:49 +04:00
Manu
10ed2c3f44
Fix for Debian 11 (#76)
* Fix for Debian 11 install
* Pin CentOS version
* Bump Python version
2021-08-18 18:53:42 +04:00
Casey Link
81a3f1106e
Fedora: correctly install borg and borgmatic into the venv (#75) 2021-08-18 16:09:40 +04:00
Manu
97160c1d82 Update test badge 2021-08-05 12:03:16 +04:00
Lammert Hellinga
b52efea18e
Add if around exclude options to prevent yaml error. By @Kogelvis (#72) 2021-08-05 12:00:42 +04:00
Manu
cce04c3648
Use borgmatic_config_name for normal-sized cron job. Fixes #69 (#70) 2021-06-22 10:36:26 +04:00
Luc Stroobant
b99de011fc
Install borgmatic in virtualenv. By @stroobl. Fixes #60 (#68) 2021-06-21 21:58:51 +04:00
savoiringfaire
995c866c22
Don't specify full path in cron (#67) 2021-06-21 21:38:55 +04:00
Kevin
c94da43a80
Fix BorgBase repository creation (#66) 2021-05-09 09:27:34 +08:00
Manu
3bd0b3d497
Add Manjaro support (by @verbumfeit), CI fixes. (#65)
Co-authored-by: verbumfeit <verbumfeit@tuta.io>
2021-04-20 14:53:35 +08:00
tabic
7925d31198
Fix role badge. By @tabic (#63) 2021-03-25 22:42:26 +08:00
Manu
aa5f2d5d8d
Prettier default archive timestamps (#61) 2021-02-18 23:58:24 +08:00
Manu
bebe44d080
Rebased: cron name setable by @debauer (#59)
See #51
2021-02-17 10:16:34 +08:00
Luc Stroobant
a10b655e89
Quote exclude patterns correctly. By @stroobl (#56) 2021-01-17 13:31:46 +08:00
jobroe
a241c9378a
Allow to update borgbase repositories. By @stroobl (#53) 2021-01-15 18:55:05 +08:00
Manu
f6a01fc7f3 Leave enough time between backup and monthly check. 2021-01-15 09:30:53 +08:00
Luc Stroobant
9193c18128
Use inventory_hostname as random seed to keep same Cron time. By @stroobl (#54) 2021-01-12 09:58:47 +08:00
K
e9caa74560
Add options for consistency checks and storage. By @kenayagi (#50)
* borg_remote_rate_limit config
* borg_remote_rate_limit optional argument
* Set default rate_limit to 0 (unlimited)
* additional options for checks and storage
2020-12-24 08:23:33 +08:00
Juan Orti Alcaine
e29c4df98c
Update packages installed in Fedora (#48)
Remove Fedora 31 as it's EOL and use the borgbackup, borgmatic and
cython packages from Fedora's repositories.
2020-12-07 19:52:40 +08:00
K
613b565716
Add optional argument: remote_rate_limit. By @kenayagi (#47) 2020-12-02 19:56:50 +08:00
Samyak Jain
3e87b539d2
Removed duplicate variable in Readme. By @samyak-jain (#45) 2020-11-30 08:07:14 +08:00
Tom Wolfskämpf
30981f3d59
Prevent borgmatic_cron_checks_day from becoming 0. By @wolfskaempf (#44)
borgmatic_cron_checks_day could become 0 in the previous configuration, causing cron to reject the /etc/cron.d/borgmatic vile
2020-11-30 08:06:04 +08:00
Dick Visser
5c67c0d935
Install packages in one step. By @dnmvisser (#43) 2020-11-27 07:46:55 +08:00
Renaud Martinet
47e5cf41b4
Fix default config name in README. By @karouf (#42)
See default value here: https://github.com/borgbase/ansible-role-borgbackup/blob/master/defaults/main.yml#L4
2020-11-23 11:56:26 +08:00
Philipp Rintz
ee6f93f71b
Support for multiple repositories. By @p-rintz (#41) 2020-11-18 11:41:57 +08:00
Lukas Leitsch
0a490a3a6f
Add hooks variable to config template. By @lukasleitsch (#40) 2020-11-03 16:43:33 +08:00
Jonas
54c270acdc
Update package list for Fedora 32 (#39)
* Add specific package lists for Fedora.

The python packages have been renamed in Fedora 32 (python3-* -> python-*).
To further support Fedora 31, the RedHat vars have been copied for this case.

* Enable molecule tests for Fedora.
2020-09-22 18:32:44 +08:00
Gonéri Le Bouder
e8b992fc1d
enable EPEL only on RHEL and CentOS (#37)
Fedora has `ansible_os_family==RedHat`, but it does not use EPEL.
2020-07-21 17:21:00 +08:00
em0lar
51e89d6e24
Make cron fully times configureable. By @em0lar 2020-07-15 11:40:38 +08:00
Manu
10521fe838
Use Github actions for testing. (#35)
* Move linting to CI file, change badge.
2020-03-09 13:23:13 +08:00
Manu
12e8bca74c Limit checks to repository data. 2020-02-25 23:39:54 +08:00
Manu
0bcece6447 Update Molecule file conventions to v3. 2020-02-25 22:08:29 +08:00
Manu
615f261a3d Update Molecure lint config for v3. 2020-02-25 19:56:13 +08:00
Manu
b97d42e71c
Make less frequent checking the default and correctly run check only. (#30) 2020-02-18 16:10:02 +08:00
Manu
e5738e9114
CentOS 8 support (#29)
* Load vars and tasks by OS family instaed of package manager. Fix Dockerfile for CentOS 8.
* Config for CentOS 8 and others
* Make monthly repo checking the default
2020-02-18 14:35:20 +08:00