-
I'm running TeslaMate 1.20.1 using docker on Ubuntu 19.10. I'm trying to backup my TeslaMate data, and pg_dump is not found. I'm running the following command: % docker-compose exec teslamate pg_dump -U teslamate teslamate > teslamate.bck The resulting teslamate.bck file contains: OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: "pg_dump": executable file not found in $PATH": unknown % which pg_dump If I add the full path to pg_dump, it still doesn't work: % docker-compose exec teslamate /usr/bin/pg_dump -U teslamate teslamate > teslamate.bck % cat teslamate.bck OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: "/usr/bin/pg_dump": stat /usr/bin/pg_dump: no such file or directory": unknown If I go into the postgres container, I find that pg_dump is at /usr/bin/pg_dump Any hints would be greatly appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The fix: add the -T flag to the command (the docs say this is needed when using cron, but it seems that it may be necessary even when running the command manually). The command that worked: |
Beta Was this translation helpful? Give feedback.
The fix: add the -T flag to the command (the docs say this is needed when using cron, but it seems that it may be necessary even when running the command manually).
The command that worked:
docker-compose exec -T db pg_dump -U teslamate teslamate > /backuplocation/teslamate.bck