I used to use a docker container that makes db dumps of the database and drops it into the same persistent storage folder the main application uses. I use this for everything in docker that had a db.
Immich as recently integrated this into the app itself so its no longer needed.
All my docker persistent data is in a top level folder called dockerdata.
In that I have sub folders like immich which get mounted as volumes in the docker apps.
So now I have only 1 folder to backup for everything. I use zfs snapshots to backup locally (zfs auto shot) and borgmatic for remote backups (borgbase).
All my dockers all compose files that are in git.
I can restore he entire server by restoring 1 data folder and 1 compose file per stack.
Borgbase is remote