listmonk icon indicating copy to clipboard operation
listmonk copied to clipboard

Updating and Migrating Listmonk Questions

Open PackMeister opened this issue 3 years ago • 3 comments

I'm currently running Listmonk 2.1.0 on a Debian 11-based VPS

I'd like to update AND migrate my Listmonk instance to a different server and have following questions:

Q1: What are the options for migrating an existing Listmonk instance and its data to another server?

Q2: Is it recommended to upgrade before or after the migration?

Q3: When upgrading is all that's required is to download and run the latest binary? If so, must the binary be downloaded to and run from a specific directory?

PackMeister avatar Aug 03 '22 15:08 PackMeister

  1. pg_dump and export the listmonk database, then restore the DB on the new server, just like any other standard Postgres database dump+restore.

  2. Either is fine. listmonk --upgrade is idempotent, so it's fine to run it before or after.

  3. Are you running the Docker setup? If yes, there's no need to download the binary. If you're already running the binary, stop it, overwrite it with the new one, run --upgrade, and then start the program.

knadh avatar Aug 04 '22 05:08 knadh

I have a similar concern. It would be awesome if we could export, download, and restore the app data from inside the interface. Railway.app recently added a Listmonk starter, and I want to move there from Heroku. Accessing the Heroku database is a headache.

candidexmedia avatar Aug 15 '22 03:08 candidexmedia

Will explore the possibility of having a full SQL dump produced from directly within the app.

knadh avatar Aug 17 '22 13:08 knadh

I thought of a few ways of achieving this, but this is infeasible to do. There is no straightforward way to produce a generate a full SQL dump from within a client. Also, restoring may require the DB to be re-created from within the app, which requires elevated DB credentials.

I think it's best to leave this to psql and pg_dump that are universal and work well. Trying to recreate generic SQL dump/import functionality within the app would be scope creep.

knadh avatar Oct 17 '22 18:10 knadh

@knadh what about for more smaller scale exports like the one mentioned here: https://github.com/knadh/listmonk/issues/738

Having a simpler export and import option with who is subscribed/unsubscribed to what list could be helpful.

candidexmedia avatar Feb 08 '23 03:02 candidexmedia

@candidexmedia unsubscriptions are tied to lists (via IDs). Or do you mean blocklisted subscribers?

If exported subscriber information has to have unsubscriptions, then the exact same lists also need to exist in the new database. At that point, the simplest thing to do is do a full database dump and reimport on the target.

knadh avatar Feb 08 '23 04:02 knadh