As described in mariadb official Docker image, the MariaDB root password can be set using MARIADB_ROOT_PASSWORD and MARIADB_ROOT_PASSWORD_FILE.
Additionally, MYSQL_ROOT_PASSWORD and MYSQL_ROOT_PASSWORD_FILE are possible names for the same values.
restic-compose-backup should test for the presence of this value, and use root account to backup all databases when it is available.