Do you mean connecting to redis? What is the actual error you see?
launcher run app
runs a command in a new container context, so redis won’t be running. This would only work if redis is external.
The following should work as it runs in the context of the existing container:
docker exec -i app rails c <<<'BackupRestore::Backuper.new(Discourse.system_user.id, with_uploads: false).run'
Why are you doing the above over e.g. the simpler discourse backup --sql-only
?
You can also tell Discourse to use S3 directly as a location for backups, if you want.