The idea of containers is that they are lightweight, stateless, immutable, disposable and so on. So there is no point of making a backup from inside of a running container because:
1) You should be able to recreate such container in no time using a container image(s) or even build it from scratch using a dockerfile
2) You wouldn't be able to reasonably restore such backup into a running container
So you need to backup the image(s) for your containers and their configuration (whether passed by "docker run" parameters or externalized into a directory/directories mounted to the container. That's all what you'd do from the base system, not from within the containers.
And - if applicable - the state of application externalized into some storage unit. And here's where the fun starts because there is no universal way to back up such data. It's just like with a non-containerized environment - you wouldn't just back up running database files because you'd not have a consistent and healthy database state. So it's up to you to know what the app within the container does and be able to get a consistent state image from it. It's almost the same as backing up any ordinary app with some extra steps if you need to interact with the app in container from the base system.