docker exec db pg_dump db > db.pg_dump.bak. What you want to happen. docker exec db (pg_dump db > db.pg_dump.bak) What is actually happening (docker exec db pg_dump db) > db.pg_dump.bak. I had trouble trying to use shell quoting to fix this, maybe because of how it is treated in the container. Fortunately, we don't have to use output ... More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.