@Lanhild Sorry missed your message.
I will see if I can do another test migration this afternoon (CEST) and take some more notes. But basically I wrote the steps below on a clean Mattermost PostgreSQL install:
Dumped the DB with : pg_dump -d mattermost > mattermost.dump
Renamed on cloudron config.json to config.json.orig
Copied mattermost.dump and config.json to cloudron mattermost via the file manager
Edited config.json with the value from config.json.orig (to get the PostgreSQL details)
"ServiceSettings" => "SiteURL"
"SqlSettings" => "DataSource" and "DataSourceReplicas"
"FileSettings" => "Directory"
From the terminal app did PASSWORD=${CLOUDRON_POSTGRESQL_PASSWORD} pg_restore -h ${CLOUDRON_POSTGRESQL_HOST} -p ${CLOUDRON_POSTGRESQL_PORT} -U ${CLOUDRON_POSTGRESQL_USERNAME} -d ${CLOUDRON_POSTGRESQL_DATABASE} ../data/mattermost.dump
Rsynced all my attachments from origin_server to cloudron_server:app_folder (cf girish post )
Restarted the app