开发者

mnesia working with DCD/DCL [closed]

Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update th开发者_如何转开发e question so it's on-topic for Stack Overflow.

Closed 9 years ago.

Improve this question

I have blown up my ejabberd. I really cannot figure out what is broken. Anyhow, will have a look at that later. What I need is my roster. Everything should be stored in the mnesia db.

I want to extract my contacts (remember, I cannot start my ejabberd, erl is working)

How would I do this in the best way? I never worked with erlang, neither with mnesia. I suspect my roster beeing in the file roster.DCD.

Dumping the content of that file into a textfile would be enough for the moment...

Any help would be welcome :-)

With best regards


Assuming that the cause of your ejabberd problem is something other than a Mnesia database corruption, you can start an Erlang shell and read from the database directly. Run this command:

erl -sname ejabberd@myhost -s mnesia -mnesia dir '"/var/lib/ejabberd"'

Note that I am assuming you are using the typical Ejabberd configuration. Replace /var/lib/ejabberd with the right directory name.

Alternately, if you can get ejabberd to at least start, even if it doesn't "work" in some sense, you can simplify this further by just starting Ejabberd and then running ejabberdctl debug. This way you don't have to guess the correct node name.

Anyway, once you've got your Erlang shell open, run this command:

mnesia:dump_to_textfile("my_ejabberd.txt").

and hit Ctrl+C twice to exit, and you should be all set.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜