Just some ideas:
#1 if ERPNext does it’s own daylie backup achives:
I would expect ERPNext to create daylie backups itself. If this is the case, you just need to make sure that they are written into a bind-mount. This would allow to add the host path of the bind-mount to your backup programm and be good. Since this should already be a consitent backup,
#2 if ERPNext doesn’t create backup achives itself:
It depends whether you use named volumes or bind-mounts (=path on host). In both cases I would suggest to stop the application in order to have consistent backups.
With bind-mounts you would simply backup the path on the host and restart the container again then.
With named volumes the cleanest approach would be to create a temporary “backup container” (=any base os image will do) using the same volumes + a bind-mount to be able to store data outside the container, having a “command” that creates a tar archive of the volume and writes it into the bind-mount. Once the container did the backup you can restart it again and use your backup tool to backup the created archive.
If your backup tool allows pre-exec and post-exec scripts, you will want to put the container stop command + if named values are used the “backup container” command into the pre-exec and the container restart in the post-exec.
#3 look for a backup tool that actualy supports docker?
Since Docker is arround 8 years now, I would expect that at least a couple of backup products should have direct support for it - is anyone using such a product and can recommend it?