A little help on upgrading to docker

Hey guys,

I want to migrate my standalone install of ttrss to docker. I have a backup of my db via pgdump, could someone help me on how to (if possible) import my pgdump to docker.

thanks

I used something like this:

cat ttrss_db.bak | sudo docker exec -i ttrss-docker_db_1 psql -U postgres

A couple things to note:

  1. Make sure you used pg_dump --clean so the stuff created during container startup gets dropped when you run the command above.
  2. (edit: This is apparently wrong, although I did see errors during the restore, due to the mismatch, that I thought were preventing a successful run. FWIW I modified the user referenced in my backup.) ttrss-docker_db_1 will have a user determined by POSTGRES_USER (.env). You’ll likely run into issues if that username differs from what’s in your DB backup, so make sure they match up (start out w/ POSTGRES_USER as what you were using before, modify the backup script to reference the postgres user, etc.).

Don’t use docker but was considering and can you clarify this? The db_1 script users an environment variable for the user name for the tt-rss database, cirrect? Can I just set this in the environment before runnn gr command above? Is somehting else needed?

they don’t need to match up, it doesn’t matter at all.

  • dump old database, you should have credentials for it
  • start docker setup so containerized postgres database is created
  • import your dump to the db container, i’ve posted exactly how to do this several times before
  • migrate plugins.local etc