Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to update borgbase repositories #53

Merged
merged 2 commits into from
Jan 15, 2021

Conversation

jobroe
Copy link
Contributor

@jobroe jobroe commented Dec 31, 2020

This PR allows to update existing borgbase repositories.

Why it is needed:

  • When a sever needs to be rebuild with the help of ansible, it's not wanted to create a another borgbase repository. Instead the new ssh-key should be added to allow restoring from borg-backup.

How it works:

  • When the given repository name already exist on borgbase, instead of failing the ssh-key will be added to existing repository.

Let me know, what are think about and if something is missing/should be changed !

Thanks

Copy link
Collaborator

@m3nu m3nu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change and simple implementation. Just some simplifications needed to arrive a Python best practice.

library/borgbase.py Outdated Show resolved Hide resolved
library/borgbase.py Outdated Show resolved Hide resolved
library/borgbase.py Outdated Show resolved Hide resolved
library/borgbase.py Outdated Show resolved Hide resolved
library/borgbase.py Outdated Show resolved Hide resolved
@m3nu m3nu merged commit a241c93 into borgbase:master Jan 15, 2021
@m3nu
Copy link
Collaborator

m3nu commented Jan 15, 2021

Thanks! Merged and updated on Ansible Galaxy.

@m3nu
Copy link
Collaborator

m3nu commented Jan 17, 2021

I added some filters to the GraphQL API to search repos and SSH keys by name or hash and query a single repo or key.

There could be some small benefits from this for this PR, but nothing major, since neither the repo name or key name are guaranteed to be unique. Currently this PR will just pick the last occurrence of either.

More: https://api.borgbase.com/graphql (click Docs on the right)

m3nu pushed a commit to debauer/ansible-role-borgbackup that referenced this pull request Feb 17, 2021
kitos9112 pushed a commit to kitos9112/ansible-role-borgbackup that referenced this pull request Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants