Commit Graph

44 Commits

Author SHA1 Message Date
Kamil Essekkat
cbe280e7ff
docs: Repositories can be a list (#134) 2023-06-18 15:02:05 +01:00
Manu
f5d7a0afb6
Update namespace (#129) 2023-05-16 08:07:46 +02: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
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
Manuel Riel
1def545c86
Remove borgbase module, now separate (#100) 2022-05-13 11:17:47 +04:00
Manu
29d0c5f480
Unify all Borgmatic hooks in one variable (#93) 2022-02-20 14:42:09 +04:00
Manu
97160c1d82 Update test badge 2021-08-05 12:03:16 +04: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
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
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
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
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
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
Manu
f66105f94b
Re-arrange and expand readme (#28) 2020-02-18 12:47:24 +08:00
Manu
5c883a734b
Add testing with Molecule/Ansible-lint, undo #9 (#26)
* Add testing with Molecule/Ansible-lint and fix linting errors
* Undo PR #9 for now (sorry)
2020-02-18 00:21:21 +08:00
madhermit
2d8d666633
Update: made the lock_wait optional argument configurable (#24) 2020-02-17 20:41:12 +08:00
Marien Fressinaud
85211377b6
Add a ssh_key_file optional argument (#21)
I already had an existing SSH key, with a different name. I wanted to be
able to use this one instead of creating another key, potentially used
for another server.
2020-01-29 15:29:33 +08:00
Marien Fressinaud
fddfbbdc0b Allow to specify borg remote-path argument (#20)
I'm using a server where both Borg 0.x and 1.x are installed. The `borg`
command use the version 0.x but I need the version 1.x. This option
allows me to override the borg remote path with `borg1`.
2020-01-15 07:59:22 +08:00
madhermit
c1fd4e5c80 Added before and after Borgmatic hooks for errors (#10)
This allows you to use this role to run a number of scripts/commands before and after backup using the hooks provided by borgmatic. See https://torsion.org/borgmatic/docs/how-to/add-preparation-and-cleanup-steps-to-backups/#preparation-and-cleanup-hooks

You can specify multiple commands like so:

    borgmatic_before_backup_command:
        - dump-a-database /to/file.sql
        - echo "`date` - Backup hook doing work!"
2019-10-24 13:07:37 +08:00
madhermit
0fcbef29a9 Allow per-app configurations (#9)
This PR allows for multiple per application borgmatic configurations as per this article: https://torsion.org/borgmatic/docs/how-to/make-per-application-backups/
2019-10-24 13:05:19 +08:00
Philipp Rintz
f9e1fa9161 Auto-creation of Borgbase.com repositories (#7) 2019-09-23 18:30:22 +02:00
Hunter
bf7df0a181 Update: added retention policy settings to config 2019-07-19 21:52:28 +00:00
Manu
e809ec597d Add support for RPM-based distros (CentOS, RHEL, Fedora) 2019-05-27 18:12:13 +08:00
Manu
e30ce279c4 Improve Borgmatic cron-job names. 2019-05-15 12:44:10 +08:00
Manu
6787e98f08 Add option to check large repos only on Sunday. 2019-05-01 10:39:07 +08:00
Manuel Riel
880ec5b617
Update README.md 2018-12-16 16:57:43 +08:00
Manuel Riel
ae36f200d3
Update README.md 2018-12-16 16:57:17 +08:00
Manu
ecc4ccce78
Update README.md 2018-10-29 11:52:47 +08:00
Manu
c751beec80
Update README.md 2018-10-29 11:52:03 +08:00
Manu
78c7d3a99b Add 4 new config options. (#2) 2018-10-29 11:50:18 +08:00
Manu
667897daad Allow flexible name for Borgmatic config file. (#1) 2018-10-29 11:27:25 +08:00
Manu
0aad2dde68 Expand desc. 2018-10-12 14:19:01 +08:00
Manu
a1b97c42a8 Expand desc. 2018-10-12 14:16:28 +08:00
Manu
a7e8fbfb5e Add meta-folder for Ansible Galaxy. 2018-10-12 14:10:42 +08:00
Manu
252ccea891
Update README.md 2018-10-07 01:15:14 +08:00
Manu
fecacf36d9 initial commit 2018-10-06 20:04:20 +08:00