Invoice Ninja - Mariadb Dump Problems

I am not sure if this is the correct forum for this question, but I am trying to do a mysqldump of the mariadb database in my invoice ninja app running on Truenas scale Electric Eel 24.10.1.

If I shell into the mariadb container, it says I do not have the rights to create the backup file.

If I try to do it as a cron job using

sudo docker exec 0cad5bab45e5 mysqldump -u ninja -pninja ninja > backup.sql

I get the error - sh: 1: cannot create backup.sql: Read-only file system

I am not sure if it is related but the maria-db container has lots of warnings saying

[Warning] Access denied for user ‘root’@‘127.0.0.1’ (using password: YES)

Otherwise the app seems to running OK.

The app details are shown below.

Any help is much appreciated.