Location of metabase.db file

i’ve read, and tried all i could find for metabase file location. i’ve put it under /etc/profile didnt worked, under the service file but still not working, the files are created on the / of the machine.

so for now, i needed to put a softlink to the location where i want the DB file…

is there a way to make variable works ?

MB_DB_FILE=/var/metabase/metabase.db
MB_DB_TYPE=h2

i’ve put this under /etc/profile

export MB_DB_TYPE=h2
export MB_DB_FILE=/var/metabase/metabase.db

and also under /etc/systemd/system/metabase.service

[Service]
MB_DB_TYPE=h2
MB_DB_FILE=/var/metabase/metabase.db

i can see the variables when i do env, the only way i could have that working is with softlink under the /

lrwxrwxrwx. 1 root root 34 May 17 14:43 metabase.db.trace.db -> /var/metabase/metabase.db.trace.db
lrwxrwxrwx. 1 root root 31 May 17 14:44 metabase.db.mv.db -> /var/metabase/metabase.db.mv.db

forgot to mention, using CentOS Linux release 7.4.1708 (Core)

with metabase

You’re on version v0.32.6

Built on 2019-05-08

Hi @francois
But it looks like you’ve setup Metabase to run as a systemd service, so unless you’re using the same user as the service, you don’t share environment variables.
There’s no official systemd documentation currently, but there’s an open PR - the title says Debian, but I would think this would work for most systems that are running systemd.