I am running mariadb in a docker container and I am try to back it up via cron and a bash script. I can't figure out the correct syntax of the ' and " This is what I want to do, this works when I insert it into my terminal: docker exec mariadb sh -c 'exec mysqldump --single-transaction -u myDb_user -p"secret" myDb' > tmp.sql This is the line of code which causes the error in my bash script (should do the exact same thing than the line above, but...
Originally asked by TMaddox on Stack Exchange (askubuntu) (CC BY-SA 4.0).