File

mod_storage_metronome_readonly/README.markdown @ 6199:fe8222112cf4

mod_conversejs: Serve base app at / This makes things slightly less awkward for the browser to figure out which URLs belong to a PWA. The app's "start URL" was previously without the '/' and therefore was not considered within the scope of the PWA. Now the canonical app URL will always have a '/'. Prosody/mod_http should take care of redirecting existing links without the trailing / to the new URL. If you have an installation at https://prosody/conversejs then it is now at https://prosody/conversejs/ (the first URL will now redirect to the second URL if you use it). The alternative would be to make the PWA scope include the parent, i.e. the whole of https://prosody/ in this case. This might get messy if other PWAs are provided by the same site or Prosody installation, however.
author Matthew Wild <mwild1@gmail.com>
date Tue, 11 Feb 2025 13:18:38 +0000
parent 6173:f99f730f2b84
line wrap: on
line source

---
labels:
- 'Type-Storage'
- 'Stage-Alpha'
summary: Metronome Read-only Storage Module
...

Introduction
============

This is a storage backend using Metronome Lua storage.

This module only works in read-only, and was made to be used by [mod\_migrate]
to migrate from Metronome’s storage.

So far it has only been tested migrating to sqlite, because
mod\_storage\_internal relies on the same `data_path` variable as this module,
and thus would overwrite the files we just read.

I’ve also only tested it on a dump from a Metronome configured by Yunohost, so
using LDAP and such for user accounts, I don’t yet know how to migrate from
different Metronome account storages.

Configuration
=============

Copy the module to the prosody modules/plugins directory.

In Prosody's configuration file, set:

    storage = "metronome_readonly"
    data_path = "/var/lib/metronome"

To run the actual migration, run these two commands (replace `<host>` with the domain you want to migrate):

    prosodyctl mod_migrate <host> roster,vcard,private,cloud_notify,pep,pep_data-archive,offline-archive,archive-archive,uploads-archive sql
    prosodyctl mod_migrate muc.<host> config,persistent,vcard_muc,muc_log-archive sql

It will create a file in `/var/lib/metronome/prosody.sqlite`, after which you
can change your configuration file to point to it, or alternatively you can
perform a second migration to the internal storage if you prefer that.

Compatibility
=============

  ------------------------ --------
  trunk (as of 2025-01-10) Works
  0.12                     Untested
  ------------------------ --------