Comparison

mod_migrate/README.md @ 6211:750d64c47ec6 draft default tip

Merge
author Trần H. Trung <xmpp:trần.h.trung@trung.fun>
date Tue, 18 Mar 2025 00:31:36 +0700
parent 6003:fe081789f7b5
comparison
equal deleted inserted replaced
6210:24316a399978 6211:750d64c47ec6
1 ---
2 summary: prosodyctl cross storage driver migration tool
3 ...
4
5 Introduction
6 ============
7
8 This module adds a command to `prosodyctl` for copying data between
9 storage drivers.
10
11 Usage
12 =====
13
14 prosodyctl mod_migrate example.com <source-store>[-<store-type>] <target-driver> [users]*
15
16 `<source-store>` would be e.g. `accounts` or `private`. To migrate
17 archives, the optional suffix `<store-type>` would be set to `archive`,
18 so e.g. `archive2-archive` or `muc_log-archive`. Multiple stores can be
19 given if separated by commas.
20
21 `<target-driver>` is the storage driver to copy data to, sans the
22 `mod_storage_` prefix.
23
24 `mod_migrate` tries to request a list of users from `usermanager`, but
25 this does not always work. If so, you can supply usernames as arguments
26 after the target driver.
27
28 The process is something like this:
29
30 1. Decide on the future configuration and add for example SQL
31 connection details to your prosody config, but don't change the
32 `store` option yet.
33 2. With Prosody shut down, run
34 `prosodyctl mod_migrate example.com accounts sql`
35 3. Repeat for each store, substituting 'accounts'. E.g. vcards,
36 private...
37 4. Change the [`storage` configuration](https://prosody.im/doc/storage)
38 to use the new driver.
39 5. Start prosody again.
40
41 Examples
42 ========
43
44 ``` sh
45 prosodyctl mod_migrate example.com accounts,roster,private,vcard sql
46 ```
47
48 Compatibility
49 =============
50
51 Should work with 0.8 and later.