Comparison

mod_migrate/README.markdown @ 1813:f02f52a2ee11

mod_migrate: Add support for migrating archives
author Kim Alvefur <zash@zash.se>
date Tue, 01 Sep 2015 10:59:43 +0200
parent 1812:22b799c7b50a
child 1814:7b4e841dcd77
comparison
equal deleted inserted replaced
1812:22b799c7b50a 1813:f02f52a2ee11
1 --- 1 ---
2 labels:
3 summary: prosodyctl cross storage driver migration tool 2 summary: prosodyctl cross storage driver migration tool
4 ... 3 ...
5 4
6 Description 5 Description
7 =========== 6 ===========
8 7
9 This module adds a command to `prosodyctl` for copying data between 8 This module adds a command to `prosodyctl` for copying data between
10 storage drivers. 9 storage drivers.
11 10
12 Usage: 11 Usage:
13 `prosodyctl mod_migrate example.com <source-store> <target-driver> [users]*`
14 12
15 `<source-store>` would be e.g. `accounts` or `private` 13 Usage: prosodyctl mod_migrate example.com <source-store>[-<store-type>] <target-driver> [users]*
14
15 `<source-store>` would be e.g. `accounts` or `private`. To migrate
16 archives, the optional suffix `<store-type>` would be set to `archive`,
17 so e.g. `archive2-archive` or `muc_log-archive`.
16 18
17 `<target-driver>` is the storage driver to copy data to, sans the 19 `<target-driver>` is the storage driver to copy data to, sans the
18 `mod_storage_` prefix. 20 `mod_storage_` prefix.
19 21
20 The process is something like this: 22 The process is something like this:
21 23
22 1. Decide on the future configuration and add this to your prosody 24 1. Decide on the future configuration and add for example SQL
23 config. 25 connection details to your prosody config, but don't change the
26 `store` option yet.
24 2. With Prosody shut down, run 27 2. With Prosody shut down, run
25 `prosodyctl mod_migrate example.com accounts sql` 28 `prosodyctl mod_migrate example.com accounts sql`
26 3. Repeat for each store, substituting 'accounts'. E.g. vcards, 29 3. Repeat for each store, substituting 'accounts'. E.g. vcards,
27 private... 30 private...
28 4. Change the `storage` configuration to use the new driver. 31 4. Change the [`storage` configuration](https://prosody.im/doc/storage)
32 to use the new driver.
29 5. Start prosody again. 33 5. Start prosody again.
34
35 Examples
36 ========
37
38 for store in accounts roster private blocklist vcard archive2-archive; do
39 prosodyctl migrate example.com $store sql2
40 done
41
42 Compatibility
43 =============
44
45 Should work with 0.8 and later.