[ejabberd] Recover data from archive_msg.DAT (SOLVED: paths must be relative to ejabberd's base dir)

pitchum pitchum at gramaton.org
Wed Feb 7 13:26:46 MSK 2018


Le 06/02/2018 à 23:05, pitchum a écrit :
> I tried this:
> 
>     sudo -u ejabberd ejabberdctl --no-timeout export2sql \
>       gramaton.org /tmp/dump.sql
> 
> But nothing happens and file /tmp/dump.sql is not generated.
> Did I do something wrong?

I finally got it to work. Actually the export2sql command doesn't allow
an absolute path as a second argument. It expects a path relative to
ejabberd's base directory. So the following command works:

    sudo -u ejabberd ejabberdctl --no-timeout export2sql \
       gramaton.org dump.sql

And the SQL dump will be in /var/lib/ejabberd/dump.sql.


Would it be possible to make ejabberdctl commands accept absolute paths?
Otherwise it would be helpful to indicate in `ejabberdctl help` that all
paths are relative to ejabberd's base directory.
It took me some time to guess it by myself. Hopefully I tried
'export_piefxis' too and then a valuable error message was printed in
the log file. 'export2sql' did not print any error.


-- 
pitchum


More information about the ejabberd mailing list