What’s the issue with running Postgres inside a docker container + regular backups? Never had problem and relatively easy to manage.
Compare that with using your distro's packaged version where you can have version variations, variations in default config or file path locations, etc.
You can abuse git for it if you really want to cut corners.