Backup server with Git, which files to track?

Hi, I have a docker-compose file to compose all my home systems.
I want to track my home-server settings with git, to be able to move to another device, and launch all my systems.

So after I starting the Plex server, I’m getting a lot of config files. Of course, I added the Cache dir to the .gitignore, but still, I have a lot of files, and I don’t think I need them when I’m moving to another device.
By saying “moving to another device” I mean to save the settings only, all the media library, and other things that Plex can regenerate, I don’t want to backup.

So which files (as minimal as possible) should I need to track?

I’m not sure what settings you are looking wanting to keep but Advanced server settings which has the things that identifies the server is in the Preferences.xml, Library settings are in the database and agent settings are a bunch of XML files in metadata folders.

Bad news… so I have to backup my database in order to save the libraries location and config…

The server does that on it’s own already if you have it enabled. https://support.plex.tv/articles/201553286-scheduled-tasks/