Skip to content

Migrating from version 1

This guide will help to migrate from the version 1 over to the new version.

The following prerequistes are expected:

  • A running instance of the mete-server
  • A running and up-to-date (!) instance of the Metekasse V1.

Running the migration script

Inside of the docker container of the mete-server is a script called migrate.py. It migrates all data avaliable in V1 to the new server.

docker exec metekasse-server ./migrate.py <URL_TO_METEKASSE>
Example
docker exec metekasse-server ./migrate.py https://mete.chaosdorf.space

Note

A few important notes:

  • When running the script twice, you will have duplicate data. It will not perform deduplication. Its recommend to only migrate with a clean database.
  • The domain or url must be accessable over the metekasse-server. If that is not possible: see To Endpoint parameter
  • When you have a passphrase setup on your server (see server configuration), transfering products will cause an error. To provide your passphrase: see Passphrase parameter.

Parameters

A explaination of all parameters you can set for migrating.

To Endpoint

If the Metekasse V1 is not accessable in the container, you can use docker run together with the parameter --to-endpoint.

docker run --network host codeberg.org/chaosdorf/mete-server:beta ./migrate.py --to_endpoint "<URL_TO_METE_SERVER>" <URL_TO_METEKASSE>
Example
docker run --network host codeberg.org/chaosdorf/mete-server:beta ./migrate.py --to_endpoint "https://metekasse-server:8000" https://mete.chaosdorf.space

Passphrase

In case, authentication is setup (see server configuration), you will need to provide your passphrase to the migration script.

Use the parameter --passphrase <PASSPHRASE> for that.

Prevent avatar migration

You can choose if you want to migrate avatars. By default, it will migrate all avatars, but with --no_avatar_transfer you can prevent that.

This might improve migration times or allows you migrate even without having the newest version of the Metekasse V1. However it will cause loss of data (the avatars), thus not recommended!