Support for multiple repository root directories #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently only one backup per host is possible. The root folder for the backups is set in
borg_server_repo_root.But it is desirable to make at least a second backup, e. g. to a temporary connected external drive.
The scripts
borgctlandbackup.shneed to be aware of the repository currently used.Maybe I can set one repository as default in the scripts and another ones as fallback. When the script is called without any repository then the default repository is used and if the script is called with a path for a repository, it is checked if it is existant.
Following tasks would need to be done. Either
borg_server_repo_rootneed to be a mapping with multiple entries or another variableborg_server_repo_root_additionalis needed. A mapping could look like this:Then everything including the repo root variable need to be called multiple times.
forgejo.lingnet.internal/ansible-roles/borg@5acb7842af/tasks/configure.yaml (L20-L31)forgejo.lingnet.internal/ansible-roles/borg@5acb7842af/tasks/configure.yaml (L33-L41)forgejo.lingnet.internal/ansible-roles/borg@5acb7842af/tasks/configure.yaml (L156-L198)BORG_REPOenvironment variable need to be modified to take a variable. Currently it does just take a static defined variable of one repo url.forgejo.lingnet.internal/ansible-roles/borg@5acb7842af/templates/borg-environment.j2 (L15)This also does imply that some argument interpreting for the script would be necessary. Another solution could be to deploy multiple scripts.
tasks/main.yamlneed to check the config for multi repo root directories.--restrict-to-repositorymultiple times for borg serve. This is also addressed in #8.In summary this change does need a bigger refactoring of the role.