-
Notifications
You must be signed in to change notification settings - Fork 277
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
Why dashboard_versions directory is not included in produced backup file? #177
Comments
The same happened on my side. Tested with a python:3.11.4-alpine3.18 docker image and data stored on a virtual machine with the current master branch (and minimal adjustments due to the Yet, not tested what this means for restoring. |
To me this looks as 'versions' mean here dashboard-versions. grafana-backup-tool/grafana_backup/cli.py Lines 27 to 28 in 3dd9d71
Which are saved with the help of this: Especially with this folder-name:
But in the archive I only can find the folder_name
Question 1: Are |
I think this would be a patch: diff --git a/grafana_backup/archive.py b/grafana_backup/archive.py
index 71b37bf..1db698a 100755
--- a/grafana_backup/archive.py
+++ b/grafana_backup/archive.py
@@ -10,7 +10,7 @@ def main(args, settings):
backup_files = list()
for folder_name in ['folders', 'datasources', 'dashboards', 'alert_channels', 'organizations', 'users', 'snapshots',
- 'versions', 'annotations', 'library-elements', 'teams', 'team_members', 'alert_rules']:
+ 'dashboard_versions', 'annotations', 'library-elements', 'teams', 'team_members', 'alert_rules']:
backup_path = '{0}/{1}/{2}'.format(backup_dir, folder_name, timestamp)
for file_path in glob(backup_path):
diff --git a/grafana_backup/cli.py b/grafana_backup/cli.py
index b99b47d..051ed31 100755
--- a/grafana_backup/cli.py
+++ b/grafana_backup/cli.py
@@ -24,8 +24,8 @@ Options:
-h --help Show this help message and exit
--version Get version information and exit
--config=<filename> Override default configuration path
- --components=<> Comma separated list of individual components to backup (all by default); versions can only be saved not restored.
- <folders,folder_permissions,dashboards,datasources,alert-channels,alert-rules,organizations,users,snapshots,versions,annotations,library_elements,teams,team_members>
+ --components=<> Comma separated list of individual components to backup (all by default); dashboard-versions can only be saved not restored.
+ <folders,folder_permissions,dashboards,datasources,alert-channels,alert-rules,organizations,users,snapshots,dashboard-versions,annotations,library_elements,teams,team_members>
--no-archive Skip archive creation and do not delete unarchived files
(used for troubleshooting purposes)
diff --git a/grafana_backup/save.py b/grafana_backup/save.py
index bb67ada..7c06814 100755
--- a/grafana_backup/save.py
+++ b/grafana_backup/save.py
@@ -5,7 +5,7 @@ from grafana_backup.save_datasources import main as save_datasources
from grafana_backup.save_folders import main as save_folders
from grafana_backup.save_alert_channels import main as save_alert_channels
from grafana_backup.save_snapshots import main as save_snapshots
-from grafana_backup.save_versions import main as save_versions
+from grafana_backup.save_dashboard_versions import main as save_dashboard_versions
from grafana_backup.save_annotations import main as save_annotations
from grafana_backup.archive import main as archive
from grafana_backup.s3_upload import main as s3_upload
@@ -31,7 +31,7 @@ def main(args, settings):
'organizations': save_orgs,
'users': save_users,
'snapshots': save_snapshots,
- 'versions': save_versions,
+ 'dashboard-versions': save_dashboard_versions,
'annotations': save_annotations,
'library-elements': save_library_elements,
'teams': save_teams,
diff --git a/grafana_backup/save_versions.py b/grafana_backup/save_dashboard_versions.py
similarity index 100%
rename from grafana_backup/save_versions.py
rename to grafana_backup/save_dashboard_versions.py |
@chriz-active Would you be willing to submit that as a PR? |
If someone confirms that this repo is still maintained --- which it didn't look like the last few days - and I'm aware and appreciate a lot that people are doing open source projects in their spare time and it sometimes takes a bit longer. :)
|
@chriz-active Yes this repo is still maintained. I've commented on your PR #226 |
Hi, this is more question than issue..
Why
dashboard_versions
directory is not included in produced backup file? I use S3 storage and uploaded backup file (e.g. 202203011336.tar.gz) doesn't containdashboard_versions
directory.Thanks.
The text was updated successfully, but these errors were encountered: