[ejabberd] JEP-0133: Service Administration

Badlop badlop at safe-mail.net
Sat Dec 11 13:19:22 MSK 2004


Sander Devrieze wrote:
> 1) make the "migrate from Jabberd14" options from the disco nodes (dir and 
> spool file) accessible via ejabberdctl

Here is the directory option. I can't try it:


--- ejabberd_ctl.erl.cvs    2004-12-11 10:37:50.000000000 +0100
+++ ejabberd_ctl.erl.new    2004-12-11 11:09:12.000000000 +0100
@@ -173,6 +173,17 @@
         ?STATUS_BADRPC
      end;

+process(Node, ["import", Path]) ->
+    case rpc:call(Node, jd2ejd, import_dir, [Path]) of
+       {atomic, ok} ->
+            ?STATUS_SUCCESS;
+        _ ->
+            Reason = "unknown reason",
+            io:format("Can't store backup in ~p on node ~p: ~p~n",
+                [Path, Node, Reason]),
+            ?STATUS_ERROR
+    end;
+
  process(Node, ["registered-users"]) ->
      case rpc:call(Node, ejabberd_auth, dirty_get_registered_users, []) of
     Users when is_list(Users) ->
@@ -223,6 +234,7 @@
        "  install-fallback file\t\tinstall a database fallback from file~n"
        "  dump file\t\t\tdump a database in a text file~n"
        "  load file\t\t\trestore a database from a text file~n"
+      "  import directory\t\timport jabberd-1.4 spool directory~n"
        "  registered-users\t\tlist all registered users~n"
        "  delete-expired-messages\tdelete expired offline messages from 
database~n"
        "~n"



More information about the ejabberd mailing list