-
Notifications
You must be signed in to change notification settings - Fork 2
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
Restore does not restore all files or give any indication of failure #5
Comments
Additional troubleshooting shows that: A) Only one file is restored even if the file string matches multiple files B) It does not restore datasources. Navigate to the grafana server and there is no new datasource. |
O.K. I see what's causing A. It's shell expansion. It imports multiple files if you quote the restore pattern. For: 'testEnvironmentBackup/*' is first being expanded by the shell. So what's really being passed to grafana-backup is '-verbose restore testEnvironmentBackup/app-team-roll-up-start.db.json testEnvironmentBackup/big-ip-device-statistics-from-snmp.db.json testEnvironmentBackup/big-ip-overview.db.json testEnvironmentBackup/node-exporter-full-v3.db.json testEnvironmentBackup/node-exporter-full.db.json testEnvironmentBackup/prometheus-2-0-overview.db.json testEnvironmentBackup/prometheus-data-exploration.db.json testEnvironmentBackup/prometheus-stats-customized.db.json testEnvironmentBackup/prometheus-stats.db.json testEnvironmentBackup/prometheus-test.ds.1.json' And since we are only grabbing args[1] we only get the first file
So this could either be an update to the usage/readme or we could update it to accept a list of files. If you're O.K. with requiring that the pattern be quoted I would prefer it be turned into a command line flag instead of just a bare argument to make it more obvious that the user is passing a search string instead of a list of files. |
I agree it is wrong behavior. PR proposed by you is ok solution. |
Did a backup of a grafana instance which produced nine dashboard files and a single datasource file.
Ran the restore on the same set of files but to a different grafana server. It restored one of the dashboards and did not restore the datasource. Even with -verbose it simply read
Dashboard restored from app-team-roll-up-start.db.json
The text was updated successfully, but these errors were encountered: