0

I'm have oldserver with Debian 6, ejabberd v. 2.1.5-3 with mnesia BD and need move users and passwords to newserver with Debian 9.6, ejabberd 16.09-4 and mnesia BD. Nodenames of servers is different. I'm do ejabberd.dump , ejabberd.backup on oldserver. When I try on oldserver do:

root@oldserver ejabberdctl export_piefxis /var/lib/ejabberd/1/

Problem 'throw {error,exmpp_not_installed}' occurred executing the command.
Stacktrace: [{ejabberd_piefxis,try_start_exmpp,0},
             {ejabberd_piefxis,export_hosts,2},
             {ejabberd_ctl,call_command,3},
             {ejabberd_ctl,try_call_command,3},
             {ejabberd_ctl,process2,3},
             {ejabberd_ctl,process,1},
             {rpc,'-handle_call_call/6-fun-0-',5}]

I'm copy ejabberd.dump, ejabberd.backup, ejabberd directory from oldserver to /var/lib/ejabberd_old/ in newserver. In newserver I'm try:

root@newserver: ejabberdctl load /var/lib/ejabberd/old/ejabberd.dump

Can't load dump in "/var/lib/ejabberd/old/ejabberd.dump" at node ejabberd@Public: open

root@newserver: ejabberdctl mnesia_change_nodename ejabberd@oldserver ejabberd@newserver /var/lib/ejabberd/old/ejabberd.backup /var/lib/ejabberd/old/ejabberd_new.backup

Error: {file_error,"/var/lib/ejabberd/old/ejabberd_new.backup.BUPTMP",eacces}

root@newserver: ejabberdctl restore /var/lib/ejabberd/old/ejabberd.backup

Problem 'error {case_clause,
               {aborted,
                   {file_error,"/var/lib/ejabberd/old/ejabberd.backup",
                       eacces}}}' occurred executing the command.
Stacktrace: [{ejabberd_admin,restore_mnesia,1,
                             [{file,"src/ejabberd_admin.erl"},{line,491}]},
             {ejabberd_ctl,call_command,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,324}]},
             {ejabberd_ctl,try_call_command,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,298}]},
             {ejabberd_ctl,process2,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,247}]},
             {ejabberd_ctl,process,2,
                           [{file,"src/ejabberd_ctl.erl"},{line,225}]},
             {rpc,'-handle_call_call/6-fun-0-',5,
                  [{file,"rpc.erl"},{line,187}]}]

root@newserver: ejabberdctl import_dir /var/lib/ejabberd_old/

Problem 'error {badmatch,{error,eacces}}' occurred executing the command.
Stacktrace: [{jd2ejd,import_dir,1,[{file,"src/jd2ejd.erl"},{line,78}]},
             {ejabberd_admin,import_dir,1,
                             [{file,"src/ejabberd_admin.erl"},{line,436}]},
             {ejabberd_ctl,call_command,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,324}]},
             {ejabberd_ctl,try_call_command,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,298}]},
             {ejabberd_ctl,process2,4,
                           [{file,"src/ejabberd_ctl.erl"},{line,247}]},
             {ejabberd_ctl,process,2,
                           [{file,"src/ejabberd_ctl.erl"},{line,225}]},
             {rpc,'-handle_call_call/6-fun-0-',5,
                  [{file,"rpc.erl"},{line,187}]}]strong text

What I can do more for migrate DB to new version of ejabberd.

1 Answer 1

0

eacces means that the program doesn't have system permission to read the file. Maybe the file is read-only for root, but ejabberd is running by user 'ejabberd', or something like that.

Another thing, completely different, that you can try:

  1. You have old ejabberd running correctly? Then stop it.
  2. Install new ejabberd in a new path, or at least, make sure it doesn't use old config files, old database files, and old logs...
  3. You can start new ejabberd to ensure it at least works perfectly. Of course it doesn't have your old users.
  4. Stop the new ejabberd.
  5. Delete the files in the new database path. Copy the old database files to the new database path.
  6. If you try to start the new ejabberd now, it will fail, because the erlang node name has changed, so proceed to step 7:
  7. Configure the new ejabberd to use the same "erlang node name" as the old ejabberd. This option is in the file ejabberdctl.cfg, and you want to put something like: ERLANG_NODE=ejabberd@oldserver
  8. Now start the new ejabberd again, as in step 6. It should use the old database files, and now it should accept them because is using the old nodename too.
  9. Also, it should automatically detect that the database schema is very old, and should start updating it to the new schemas. Depending in your database size, it may take seconds or a few minutes. This process should be mentioned in the log file.
  10. After the automatic database schema update, ejabberd finally starts and should work correctly.

Those are many steps, but the only difficult steps for you are 5 (copy the old database to new location), and 7 (configure old nodename in the new installation).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .