[erlang-questions] specifying directory for mnesia database

t x <>
Mon Apr 7 05:21:25 CEST 2014


Hi,

  * I'm learning to use Mnesia (until I run into 2GB table issues.)

  * I'm using erlang.mk + relx.

  * Everything appears to be working, _EXCEPT_

      * mnesia appears to be storing its tables in _rel/'node()'

      * these tables appear to get wiped when I type "make"

      * I'm not happy when my db gets wiped when I recompile my code.


  I've done some googling, and it appears my options are:


## 1) specify directory on erl commandline

example: erl -mnesia dir '"/tmp/funky"'
documentation: http://www.erlang.org/doc/apps/mnesia/Mnesia_chap2.html

I'd prefer to not take this approach, as I don't want to hack erlang.mk/relx.


## 2) specify in env config in app.src

documentation: http://www.erlang.org/doc/man/app.html

I think this is the approach I want. I also think there's a one line fix.

Can someone tell me how to, via app.src, tell mnesia to store all it's
dbs in "/tmp/mnesia" ?

Thanks!



More information about the erlang-questions mailing list