mod_migrate/mod_migrate.lua
changeset 1816 22b799c7b50a
parent 1795 8df071457dee
child 1817 f02f52a2ee11
equal deleted inserted replaced
1815:040f28f31bec 1816:22b799c7b50a
     5 local mm = require"core.modulemanager";
     5 local mm = require"core.modulemanager";
     6 
     6 
     7 function module.command(arg)
     7 function module.command(arg)
     8 	local host, source_store, migrate_to, user = unpack(arg);
     8 	local host, source_store, migrate_to, user = unpack(arg);
     9 	if not migrate_to then
     9 	if not migrate_to then
    10 		return print("Usage: prosodyctl mod_migrate example.com <source-store> <targer-driver> [users]*");
    10 		return print("Usage: prosodyctl mod_migrate example.com <source-store> <target-driver> [users]*");
    11 	end
    11 	end
    12 	sm.initialize_host(host);
    12 	sm.initialize_host(host);
    13 	um.initialize_host(host);
    13 	um.initialize_host(host);
    14 	local module = module:context(host);
    14 	local module = module:context(host);
    15 	local storage = module:open_store(source_store);
    15 	local storage = module:open_store(source_store);