Mercurial > prosody-modules
comparison mod_migrate/README.md @ 5975:fe081789f7b5
All community modules: Unify file extention of Markdown files to .md
| author | Menel <menel@snikket.de> |
|---|---|
| date | Tue, 22 Oct 2024 10:26:01 +0200 |
| parents | mod_migrate/README.markdown@c5122b7633a8 |
| children |
comparison
equal
deleted
inserted
replaced
| 5974:5a65a632d5b9 | 5975:fe081789f7b5 |
|---|---|
| 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. |
