ysde/grafana-backup-tool

Tried with Docker: Permission denied: '_OUTPUT_/dashboards'

jkbitcaster opened this issue · 1 comments

Trying the tool with docker. Connections seems to work, but getting Permission Denied:

docker run --user $(id -u):$(id -g) --rm --name grafana-backup-tool
-e GRAFANA_TOKEN=eyJrIj.....fQ==
-e GRAFANA_URL=
-e GRAFANA_ADMIN_ACCOUNT=admin
-e GRAFANA_ADMIN_PASSWORD=
-e VERIFY_SSL=true
-v /tmp/backup/:/opt/grafana-backup-tool/OUTPUT
ysde/grafana-backup

Output:

....
########################################

[Pre-Check] Server status is 'OK' !!

########################################

Traceback (most recent call last):
File "/usr/bin/grafana-backup", line 33, in
sys.exit(load_entry_point('grafana-backup==1.2.1', 'console_scripts', 'grafana-backup')())
File "/usr/lib/python3.9/site-packages/grafana_backup/cli.py", line 52, in main
save(args, settings)
File "/usr/lib/python3.9/site-packages/grafana_backup/save.py", line 52, in main
backup_functions[backup_function](args, settings)
File "/usr/lib/python3.9/site-packages/grafana_backup/save_dashboards.py", line 23, in main
os.makedirs(folder_path)
File "/usr/lib/python3.9/os.py", line 215, in makedirs
makedirs(head, exist_ok=exist_ok)
File "/usr/lib/python3.9/os.py", line 225, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: 'OUTPUT/dashboards'

@jkbitcaster Please try running chmod 777 /tmp/backup before running the docker image