I’m attempting to execute long-running commands using the container execute API and also use it’s returned websocket for reading stdout/stderr output.
I’m trying to run backup scripts this way since some services (gitlab) and also some lesser known databases require you to run the script from within the container running the service/database itself which means that container exec is my only option here (a separate start-once service connecting to the service/db over the network and running commands is not an option)
Now; all is good until the connection is lost (timeout, lost internet connection, earthquake, you name it).
When I try to reconnect to the still running command to read it’s output I can’t find a way of doing that without also executing the command again. (Not really a good thing to do when database backup is already in progress)
Is there a way to reconnect to the hostAccess websocket from the container exec call without also running the command again?