Docker volume mount

Hello Team,

I have recently did mount my docker volume at outside the container (on host machine) path /var/lib/grafana (same like container).

Now I try to restore it with newer image with following cmd →

docker run -d --name=grafana --restart=always -v /var/lib/grafana:/var/lib/grafana 88e7a2eea6d5

I have given fill access to grafana and grafana.db (even “chmod 777 grafana.db”) but in logs its says

"Error: ✗ failed to connect to database: can't check for existence of "/var/lib/grafana/grafana.db": stat /var/lib/grafana/grafana.db: permission denied
GF_PATHS_DATA='/var/lib/grafana' is not writable."

Could you please provide me a solution to restore it with new image?

Hi @karthickmj3110

The error message says that the path /var/lib/grafana is writeable, which is a permission issue.

To fix it provide the correct writeable permission to it using the chmod command and then should work.