Tiny Tiny RSS: Community

Data_migration error

I’m trying to migrate articles from a MySQL DB to an existing Postgres DB. I’m looking forward to using the data_migration plugin for this. However, I’m getting this error when trying to export:

PHP Fatal error: Uncaught Error: Class ‘Debug’ not found in /var/www/html/tt-rss2/plugins.local/data_migration/init.php:103

Where is the Debug class supposed to come from?


It also references ZipArchive, which isn’t in my environment. Maybe that comes with a newer version of ttrss? My issue is that the schema upgrade failed for my older mysql instance. It is running 17.12. What I want to do is export my older mysql instance and my stand alone postgres instance and import them both into a container instance.

OK, I fixed the schema upgrade error by following fox’s instructions in the " Potential problems when upgrading to schema 137" article. That plus upgrading to the latest tt-rss code resolved the Debug class issue.

ZipArchive issue solved with sudo apt-get install php-zip. Posting here in case it is useful to others.

good job figuring this stuff out yourself. in general, it’s best to always assume that latest plugin code requires latest tt-rss core code.

A followup. Keeping it in this thread for some context.
The Linode host I’ve been running tt-rss/mysql on for years killed the export process after some number of hours. My thought was to move the mysql DB to a much beefier local box and do the migration from mysql to postgres there (and probably just leave it running on the local box).

So I installed your containers on the local box. I also added a mariadb container and modified the tt-rss config.php to point to that db, then I exported the DB on the Linode server (mysqldump -u root -p ttrss > ~/ttrss.sql), copied that to the local host, mounted that dir in the mariadb container, got a shell in that container, created the db and then imported the tables (mysql -u root -p ttrss < /mnt/ttrss.sql).

After I did that, tt-rss couldn’t see any articles in the new DB. So I exported opml from the original and imported it on the new one. That didn’t help. The data is in the DB tables but tt-rss must not be able to relate the feeds I imported via opml to the articles in the DB.

In one of my sql-level export/import experiments I did end up being able to see articles in the new db but many/most articles were marked read, unlike from the original DB.

Is there a better way to migrate the mysql DB to a new host, with the same set of feeds and article read/unread status?

a full mysql dump/restore should just give you all your data including your tt-rss user which you should login as and go from there. i’m not sure what exactly were you doing wrong but OPML is not going to be necessary.

if you need help migrating your mysql database to a different host there’s plenty of mysql resources on the internet to help you with this task, which is entirely unrelated to tt-rss.

instead of continuing to do “experiments” while obviously not exactly understanding what is going on, i suggest looking up documentation and doing things properly (once). this isn’t really rocket science.

it might be easier to spin up a separate easy to use VM like ubuntu, without docker, install mysql and all this other stuff (tt-rss with dependencies) on the host, dump/restore your mysql data, verify that it works as expected, and then proceed with data_migration export.