Recommended way for data migration / mysql to docker

Hi there!
I am currently in the process of migrating my tinyrss instance from the “old” setup to the new, supported docker setup. So far, everything went well and I have a running instance.

But what I’d like to do is to migrate my starred articles to the new environment, so far, I haven’t really found a way to do that.

The attempt that got me somewhere was the ttrss-data-migration way, I have the export file in my docker container, but I somehow struggle to run the command.

I have created my export folder within the tt-rss folder, I can see the file in the docker container when I cd’ into the /var/www/html/tt-rss/exports directory - and when I try to run the import command, it errors out with a database connection error.

I have installed the ttrss-data-migration plugin via web frontend - is that correct?

This is what I try:

docker exec -it ttrss-docker_app_1 /bin/sh
cd /var/www/html/tt-rss/export
/var/www/html/tt-rss/export # ls -la
total 16884
drwxr-xr-x 2 root root 4096 Mar 11 11:59 .
drwxr-xr-x 25 app app 4096 Mar 11 11:59 …
-rwxrwxrwx 1 app app 17280737 Mar 11 11:59 export-2020-08-07.zip
/var/www/html/tt-rss/export # su - app
3e3af10b48d3:~$ /usr/bin/php8 /var/www/html/tt-rss/update.php --data_user admin --data_import /var/www/html/tt-rss/export/export-2020-08-07.zip

Exception while creating PDO object:SQLSTATE[08006] [7] could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
3e3af10b48d3:~$

So it seems to be unable to connect to the database… I have tried it from the updater container as well as from the db container - but it is failing with the same error every time I try it…

Would you have any suggestions or maybe another way to migrate at least the starred articles? I am using tt-rss basically since it exists and would love to be able to migrate all my data over to the new instance.

Thanks!
Alex

no shit

e: best part is how docker scripts wiki has multiple examples of using update.php properly but you had to do things the hard way while not knowing absolute basics of unix.

Yeah.

Easy to say that as the developer. But maybe, just for the fun of it, try to imagine/googling the right way to migrate the stuff from a user perspective (maybe someone who’s just using docker occasionally). That is quite a common use case and there are probably also some other people struggling with this. I found the “hard way” by googling for the errors I faced and ended up in a post somewhere in this board.

Anyway, after adding the --user app to the exec, I was able to get past the error, but the data_migrate plugin doesn’t seem to work for me.

I tried installing it from the plugin installer / cloning the data_migration into plugins.local, made sure the path/permissions are correct and tried 3 different ways to enable it without success (put the define in the config.php directly (which only seems to have ) directly, created a plugins.php in config.d and put the define line in there, then I saw the sticky post for the classes/config and tried updating it in there as well. The plugin shows up in the list but is not active and --help doesn’t show anything for the data migration so I am stuck.

I am sure I just missed another line from the wiki or it is just due to me not knowing any basics, or maybe the documentation for the part where it says

  1. Git clone to /plugins.local/data_migration
  2. Enable in PLUGINS directive of config.php

does not really work for the docker setup as the entire define is no longer there?

I’ll try it again tomorrow, and if I ever find a working solution, I’m happy to share it with this friendly community.

instead of throwing things against the wall i suggest checking documentation.

https://git.tt-rss.org/fox/ttrss-docker-compose/wiki

https://tt-rss.org/wiki/GlobalConfig

any further spoonfeeding comes bundled with a probation.

Easy way to migrate starred articles:

  1. On your old instance, turn your starred articles into an RSS feed. For extra ease-of-use, append “&limit=<number>” to the feed string, where <number> is your number of starred articles.
  2. Subscribe to that RSS feed on your new instance. Wait until all the starred articles are showing up as fresh feeds.
  3. Click on feed.
  4. Click ‘Select…’ ‘All’ (This will select 30 articles)
  5. Click ‘Select…’ ‘Toggled Starred’
  6. Click ‘Select…’ ‘Mark As Read’
  7. Repeat steps 4-6 until all articles in your starred feed are Starred.

Hope this helps!

I’ve been struggling with exactly this problem for hours - first running into this on a docker instance, then trying to do it in a non docker instance, and now back to docker and finally discovering this article while writing a post.

tt-rss is awesome. I’ve been using it since Google Reader went away. But it seems like this is yet another project where the users are expected to walk on eggshells, since the developer feels he doesn’t owe anyone anything and everyone else is an idiot.

For the record, I’ve been using Linux for 20 years, I have moderate experience developing in C, PHP, Python… It just so happens I don’t know a thing about PDO and how it figures out how to make the DB connection. I was crawling around in the php config files to try to mimic that. It didn’t occur to me that it’s all about the env variables. I don’t exactly call that “basic Unix” knowledge.

I’ll accept fox can do what he pleases with his project, but geez. Maybe just ignore people if you don’t like providing support.

the configuration schema changed ONCE in literally FIFTEEN YEARS and here you are crying about it like a wee child.

not everyone on this forum is an idiot but if there was an idiot contest your post would certainly be accepted without question.

things change. sometimes you have to learn something new.

it also didn’t occur to you to check tt-rss documentation.

at this point, containers are basic unix knowledge, yes. not that it’s stated anywhere that only basic unix knowledge (whatever that is anyway, a small subset of obsolete things people like you know? who knows, who cares) is somehow enough to deploy tt-rss.

anyway, thanks for your first post. please don’t post again.

@Shibboleth Thanks for the suggestion. This was an easy, painless way to migrate.

@fox Thank you for all of your contribution to this project over the many years.