-
Notifications
You must be signed in to change notification settings - Fork 267
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
Backup, restore, and delete teams, team-members, and library-elements #181
Conversation
+1 this looks good to me, any feedback @ysde or others? |
@acjohnson I just found out that when restoring, references between teams and users as well as dashboards and library panels are lost. Thus, I have to have to take a look at it tomorrow. |
@acjohnson |
Hi @acjohnson Hi @NilsLeger Thanks for the PR. Is it compatible for older version grafana ? Thank you |
Hi @ysde, I'm not sure whether backups or restores for older Grafana versions would stop working with this update. I thought of something like the following procedure.
What do you think? |
Yeah sure, good idea. |
@NilsLeger @ysde This approach would fail if there's no health endpoint which is the case for AWS managed grafana. See #184. |
@rubencosta Great idea! Thanks for the input! |
Is there something else that needs to be done in this PR? @ysde @rubencosta If not is it possible to merge this PR soon? |
Tried this out (merged into master) on grafana v9.3.1 for some library elements. Backing up seems to succeed, but restoring is failing with this error:
Here's the element it was trying to upload: |
Looks like File "create_library_element.py", line 19 needs to read
at least on my system. Making just this change made it work 100% for me. |
This issue is still not fixed. I have two AWS Managed Grafana: A and B.
when I restore the original backup (B to B ) everything is ok |
Problem
It was not possible to backup and restore any library-elements (library-panels) and teams. However, we heavily rely on library-panels because they are referred on multiple dashboards. Without library-elements being backed up, all our dashboard are broken after a restore.
Solution
This PR solves the above described problem by extending the grafana-backup-tool to also back up library-elements and teams.
Testing
Basic tests were already successful. I'm currently doing more advanced tests.
Any feedback and and testing is highly appreciated.
Related Issues
#180
#164