view mod_migrate/README.markdown @ 1880:a7c1f1b6ef05

mod_checkcerts: Improve error handling when loading certificate
author Kim Alvefur <>
date Tue, 29 Sep 2015 14:56:46 +0200
parents 7b4e841dcd77
children cd36e5bf00b3
line wrap: on
line source

summary: prosodyctl cross storage driver migration tool


This module adds a command to `prosodyctl` for copying data between
storage drivers.


    prosodyctl mod_migrate <source-store>[-<store-type>] <target-driver> [users]*

`<source-store>` would be e.g. `accounts` or `private`. To migrate
archives, the optional suffix `<store-type>` would be set to `archive`,
so e.g. `archive2-archive` or `muc_log-archive`.

`<target-driver>` is the storage driver to copy data to, sans the
`mod_storage_` prefix.

The process is something like this:

1.  Decide on the future configuration and add for example SQL
    connection details to your prosody config, but don't change the
    `store` option yet.
2.  With Prosody shut down, run
    `prosodyctl mod_migrate accounts sql`
3.  Repeat for each store, substituting 'accounts'. E.g. vcards,
4.  Change the [`storage` configuration](
    to use the new driver.
5.  Start prosody again.


    for store in accounts roster private blocklist vcard archive2-archive; do
      prosodyctl migrate $store sql2


Should work with 0.8 and later.