Automation: Help on Running Python script using Shell-Command

How do you create these backups?
Can HA inside the docker container access the /home/pi/... path?
Open a shell inside the HA container and test your script.

docker exec -it homeassistant bash