Migrate from on premise on digitalocean to on premise on a webhost

I have run Matomo on DO for well over a year, but since it is hosted outside of my country I need to move it to a local hosting provider.

I see migration tools, I see API and all that but the DigitalOcean site is inside a droplet, I can ONLY access the Matomo Interface and NOTHING else. I can do simple json, xml and csv exports and that should be enough, but then I cant see a way to IMPORT that to the new site.

I have no database access on DO, I have no file access on DO, and I don’t get how to use the API to make exports via Live functions. It just doesn’t say where in the interface you use the API or how, just a bunch of programmatical strings I am supposed to understand.

Help please?

Maybe DO Support can do the SQL Dump for you too, like this?

Oh… I did not know that. Thought I was left all to myself since I pay next to nothing for it and even less (0) on the new host, despite being a lot more advanced.

Will try.

Meh, the support answered with the usual CLI mumbo jumbo, mysqldump command parameter yadda yadda…

Those tools are not even installed in the droplet and I refuse to install them.

I am mostly considering this Matomos problem for not making exports/imports easier.

I get confused. First you mention, you have no access to the resources and now you say you have a DC Droplet (which is an VM that provides different forms of access: https://docs.digitalocean.com/products/droplets/how-to/).

Yes, Matomo (as far I know) has the possiblitiy to migrate via a DB dump or some way via API.
Your Droplet hosts Matomo. Is the database contained in the Droplet too?

If you are not willing to install mysqldump at the Droplet, I don’t see an easy way to get the RAW Matomo data migrated.

I would do install mysqldump in the Droplet. Create a DB dump. Export them via file transfer https://docs.digitalocean.com/products/droplets/how-to/transfer-files/ and import them at the new Matomo instance. Delete mysqldump at the Droplet.

Maybe in the future there is an Add-on that makes an RAW Matomo data export possible. But I doubt it, because the is the existing API way.

Yes the DB is inside the droplet. Last time ever I put stuff in this kinda conf.

I have read the docs about the API, do not understand how to use it. Where do I type what? Can it be done from the Matomo interface?

I never used the API, so I can’t help you out with API handling. For my need, the DB dump export and import was more then enough to do a migration job.

I think for your use case (migration to a different Matomo instance) the API is also not the preferred method of proceeding.
Have a look at this:
How can I move Matomo from one server to another, also migrating the data from one mysql server to another?

The API is mainly for to get Matomo data out of Matomo and put that data in a different tool. That means, data get out and then get translated in the way the new tool needs. Therefore you maybe need a additionally “middleware” that translates Matomo data into a format that the new tool requires (https://matomo.org/faq/how-to/faq_24536/).

That in mind - for me - it makes no sense, to have a middleware (Add-on or whatever) only for Matomo export and import. DB dump does this quit easy.

I do not have a solution for that and I think the Matomo web interface is way more an end-user interface then an server admin interface. So I don’t expect a RAW data export/import dialog there.

[UPDATE]
I just found this. Maybe this is working for you too. It’s not running from the interface, but at the CLI and there is no need of mysqldump:

I did look at Migration that but it falls upon the hurdle of them databases being externally accessible. Normally, on a database server, you only allow local access within the server farm.

However, as I give it a second thought, I should be able to enable remote mysql access to the target database, since I have CPanel on that host and I know that is an available feature.

To clarify, if you run the script from a “local access only” mysql server, you should still be able to push the database to the “remote access possible” database server on the other host.

Well worth a shot.

I have this warning on the target server and possibly not a lot i can do about it presently.

Will that affect the import?

Unable to run Matomo console commands in the DO droplet.
The console seems there and path is correct, but when trying to run it it calls for php which is not available acording to error message.

This is a load of BS. DO hosting this way via droplet with seriously cripples a lot of the intended functionality and Matomo for not having easier export-import functionality.

Good bye

I can only repeat myself…

With the use of mysqldump there is also no need to enable remote mysql accesss at the export or import side.