Location>code7788 >text

TTRSS migration practice

Popularity:204 ℃/2025-02-22 20:43:24

background

A few years ago, a TTRss + RssHub cluster was built on a cloud server to read articles.

For details, please refer to this article:Deploy RSS full set of self-hosted solutions with K8S - RssHub + Tiny Tiny Rss - Dongfeng Weiming Technology Blog

The cloud server is about to expire soon, so I just took this opportunity to migrate it from the cloud to the Homelab2 cluster at home.

The migration was done on the morning of February 22, 2025, and the result was very smooth. After the wife was finished, she had not gotten up yet, so I will use this time to summarize the migration process.

The content is a bit of a diary, if you have any questions/suggestions, please feel free to communicate.

Technology stack

Before migration

  • K3s v1.23.10+k3s1
  • Ingress: Traefik included
  • Certificate: cert-manager + DNSPod plugin
  • Storage: built-in local-path
  • Backup: velero (only backup manifests)
  • Domain name: The suffix is

After migration

  • K3s: v1.31.5+k3s1
  • Ingress: Tailscale Operator
  • Certificate: Tailscale Operator
  • Storage: rook-ceph
  • Backup: volsync
  • Domain name: suffix

In summary, it is not just a simple migration, but also requires corresponding adjustments to the storage/network-related configuration.

The migration scenario here is very specific and is only for my usage scenarios, but the migration planning/steps/ideas can be used for your reference.

📝Notes:

My full post-migration code is located at:homelab2/apps/rsshub at master · east4ming/homelab2

For length considerations, this article will not paste the detailed script/yaml. If you are interested, you can go to the repo to view it.


Migration practice

1. Backup

1.1 K8s Manifests Backup

  • Deploy
  • Service
  • PVC
  • IngressRoute(Traefik)

It has been backed up as a json file through Velero. Then it is passed through the scriptConvert to yaml and remove unwanted fields.

📝Notes:

Used kubectl krew plugin: neat

PVC data backup

  • redis data:
  • ttrss icons: empty. No backup is required.
  • ttrss postgresql data: Enter into the container, executepg_dumpall -c -U postgres >

📚️Reference:
Database update or migration | 🐋 Awesome TTRSS

Also note that you can stop ttrss Deployment before backing up Postgres data.


2. Shutdown

On the original cluster, stop all Deploys and stop all services.

3. Modify Manifests

Modify Manifests to fit the new Homelab2 cluster.

  • NS Add/privileged-moversAnnotation to enable volsync privileged backup feature
  • Deploy postgres Add initContainer Delete the PostgreSQL databaselost+foundDirectory, otherwise the startup error is reported (rook-ceph PV feature causes this adjustment to be made)
  • Deploy ttrss Add initContainer to execute the chmod command using the busybox image, and/var/www/feed-icons/The permissions of the directory are set to777
  • Modify the Host of IngressRoute.
  • Modify the depoly ttrssSELF_URL_PATHFor the new domain name
  • Change the traefik IngressRoute of rsshub and ttrss to Ingress configuration and adjust the domain name
  • Change the password in the environment variable to get from secrets (Secrets added to.gitignore) (Because my repo is public, the password should be avoided)

4. Manual deployment

cd apps/rsshub
kubectl apply -f 
kubectl apply -f deploy/ -f pvc/ -f secret/ -f service/ -f ingress/

5. Recover data

Stop all Deploys except Postgres to prevent dirty data.

5.1. Postgres

Put it firstCopy to Postgres PV.

Enter the Postgres pod and execute the following command to restore data:

cat  | psql -U postgres

5.2. Redis

WillCopy to Redis PV. (Also requiredchown)

6. Start

Start all Deploys.

7. Modify the TTRss feed settings

Log in to TTRss domain name:, Enter:Preferences -> Feed settings-> View one by one,URLfor...Modified to:...

8. Verification

  1. Verify that RssHub is normal
  2. Verify that TTRss is normal
    1. Log in TTRss
    2. Read article
    3. Verify that you can subscribe normally

9. Backup

  1. Backup Postgres data

10. Inclusion in ArgoCD Management

Because ArgoCD does not monitor the yaml files in subdirectories, all yaml files need to be placed in one directory.

Using scriptsmove_and_rename.shPerform adjustments, modify after adjustments.gitignoreFile and delete empty directories that are no longer needed.

11. Clean up the original cluster after a period of parallelism

  1. node recycling
  2. DNS record cleaning
  3. Domain name cleaning
  4. Original cluster backup s3 delete
  5. Other miscellaneous cleaning

Summarize

The above is a summary of this TTRss migration. The detailed steps are of no use to you. However, I hope that the migration planning/process/idea can provide value.

When three people walk, there must be my teacher; if knowledge is shared, the world will be the public.This article is from Dongfeng Weiming Technology Blogwrite.