aboutsummaryrefslogtreecommitdiff
path: root/src/ejabberd_admin.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/ejabberd_admin.erl')
-rw-r--r--src/ejabberd_admin.erl54
1 files changed, 37 insertions, 17 deletions
diff --git a/src/ejabberd_admin.erl b/src/ejabberd_admin.erl
index 2eeb97b99..14305e84b 100644
--- a/src/ejabberd_admin.erl
+++ b/src/ejabberd_admin.erl
@@ -119,12 +119,15 @@ get_commands_spec() ->
desc = "Restart ejabberd gracefully",
module = init, function = restart,
args = [], result = {res, rescode}},
- #ejabberd_commands{name = reopen_log, tags = [logs, server],
- desc = "Reopen the log files",
+ #ejabberd_commands{name = reopen_log, tags = [logs],
+ desc = "Reopen the log files after being renamed",
+ longdesc = "This can be useful when an external tool is "
+ "used for log rotation. See "
+ "https://docs.ejabberd.im/admin/guide/troubleshooting/#log-files",
policy = admin,
module = ?MODULE, function = reopen_log,
args = [], result = {res, rescode}},
- #ejabberd_commands{name = rotate_log, tags = [logs, server],
+ #ejabberd_commands{name = rotate_log, tags = [logs],
desc = "Rotate the log files",
module = ?MODULE, function = rotate_log,
args = [], result = {res, rescode}},
@@ -139,14 +142,14 @@ get_commands_spec() ->
args_example = [60, <<"Server will stop now.">>],
args = [{delay, integer}, {announcement, string}],
result = {res, rescode}},
- #ejabberd_commands{name = get_loglevel, tags = [logs, server],
+ #ejabberd_commands{name = get_loglevel, tags = [logs],
desc = "Get the current loglevel",
module = ejabberd_logger, function = get,
result_desc = "Tuple with the log level number, its keyword and description",
result_example = warning,
args = [],
result = {levelatom, atom}},
- #ejabberd_commands{name = set_loglevel, tags = [logs, server],
+ #ejabberd_commands{name = set_loglevel, tags = [logs],
desc = "Set the loglevel",
module = ?MODULE, function = set_loglevel,
args_desc = ["Desired logging level: none | emergency | alert | critical "
@@ -200,7 +203,7 @@ get_commands_spec() ->
result_example = [<<"example.com">>, <<"anon.example.com">>],
args = [],
result = {vhosts, {list, {vhost, string}}}},
- #ejabberd_commands{name = reload_config, tags = [server, config],
+ #ejabberd_commands{name = reload_config, tags = [config],
desc = "Reload config file in memory",
module = ?MODULE, function = reload_config,
args = [],
@@ -254,21 +257,21 @@ get_commands_spec() ->
module = ejabberd_piefxis, function = import_file,
args_desc = ["Full path to the PIEFXIS file"],
args_example = ["/var/lib/ejabberd/example.com.xml"],
- args = [{file, string}], result = {res, rescode}},
+ args = [{file, binary}], result = {res, rescode}},
#ejabberd_commands{name = export_piefxis, tags = [mnesia],
desc = "Export data of all users in the server to PIEFXIS files (XEP-0227)",
module = ejabberd_piefxis, function = export_server,
args_desc = ["Full path to a directory"],
args_example = ["/var/lib/ejabberd/"],
- args = [{dir, string}], result = {res, rescode}},
+ args = [{dir, binary}], result = {res, rescode}},
#ejabberd_commands{name = export_piefxis_host, tags = [mnesia],
desc = "Export data of users in a host to PIEFXIS files (XEP-0227)",
module = ejabberd_piefxis, function = export_host,
args_desc = ["Full path to a directory", "Vhost to export"],
args_example = ["/var/lib/ejabberd/", "example.com"],
- args = [{dir, string}, {host, string}], result = {res, rescode}},
+ args = [{dir, binary}, {host, binary}], result = {res, rescode}},
- #ejabberd_commands{name = delete_mnesia, tags = [mnesia, sql],
+ #ejabberd_commands{name = delete_mnesia, tags = [mnesia],
desc = "Delete elements in Mnesia database for a given vhost",
module = ejd2sql, function = delete,
args_desc = ["Vhost which content will be deleted in Mnesia database"],
@@ -326,7 +329,7 @@ get_commands_spec() ->
args_example = ["example.com", "/var/lib/ejabberd/example.com.sql"],
args = [{host, string}, {file, string}],
result = {res, rescode}},
- #ejabberd_commands{name = set_master, tags = [mnesia],
+ #ejabberd_commands{name = set_master, tags = [cluster],
desc = "Set master node of the clustered Mnesia tables",
longdesc = "If you provide as nodename \"self\", this "
"node will be set as its own master.",
@@ -345,31 +348,41 @@ get_commands_spec() ->
{oldbackup, string}, {newbackup, string}],
result = {res, restuple}},
#ejabberd_commands{name = backup, tags = [mnesia],
- desc = "Store the database to backup file",
+ desc = "Backup the Mnesia database to a binary file",
module = ?MODULE, function = backup_mnesia,
args_desc = ["Full path for the destination backup file"],
args_example = ["/var/lib/ejabberd/database.backup"],
args = [{file, string}], result = {res, restuple}},
#ejabberd_commands{name = restore, tags = [mnesia],
- desc = "Restore the database from backup file",
+ desc = "Restore the Mnesia database from a binary backup file",
+ longdesc = "This restores immediately from a "
+ "binary backup file the internal Mnesia "
+ "database. This will consume a lot of memory if "
+ "you have a large database, you may prefer "
+ "'install_fallback'.",
module = ?MODULE, function = restore_mnesia,
args_desc = ["Full path to the backup file"],
args_example = ["/var/lib/ejabberd/database.backup"],
args = [{file, string}], result = {res, restuple}},
#ejabberd_commands{name = dump, tags = [mnesia],
- desc = "Dump the database to a text file",
+ desc = "Dump the Mnesia database to a text file",
module = ?MODULE, function = dump_mnesia,
args_desc = ["Full path for the text file"],
args_example = ["/var/lib/ejabberd/database.txt"],
args = [{file, string}], result = {res, restuple}},
#ejabberd_commands{name = dump_table, tags = [mnesia],
- desc = "Dump a table to a text file",
+ desc = "Dump a Mnesia table to a text file",
module = ?MODULE, function = dump_table,
args_desc = ["Full path for the text file", "Table name"],
args_example = ["/var/lib/ejabberd/table-muc-registered.txt", "muc_registered"],
args = [{file, string}, {table, string}], result = {res, restuple}},
#ejabberd_commands{name = load, tags = [mnesia],
- desc = "Restore the database from a text file",
+ desc = "Restore Mnesia database from a text dump file",
+ longdesc = "Restore immediately. This is not "
+ "recommended for big databases, as it will "
+ "consume much time, memory and processor. In "
+ "that case it's preferable to use 'backup' and "
+ "'install_fallback'.",
module = ?MODULE, function = load_mnesia,
args_desc = ["Full path to the text file"],
args_example = ["/var/lib/ejabberd/database.txt"],
@@ -385,7 +398,14 @@ get_commands_spec() ->
args_example = ["roster"],
args = [{table, string}], result = {res, string}},
#ejabberd_commands{name = install_fallback, tags = [mnesia],
- desc = "Install the database from a fallback file",
+ desc = "Install Mnesia database from a binary backup file",
+ longdesc = "The binary backup file is "
+ "installed as fallback: it will be used to "
+ "restore the database at the next ejabberd "
+ "start. This means that, after running this "
+ "command, you have to restart ejabberd. This "
+ "command requires less memory than
+ 'restore'.",
module = ?MODULE, function = install_fallback_mnesia,
args_desc = ["Full path to the fallback file"],
args_example = ["/var/lib/ejabberd/database.fallback"],