I'm trying to figure out how to run an S3 sync command from a .bat file that will keep working even after I close the Command Prompt window. My goal is to perform a data migration from an on-premises system to Amazon S3 without interruption. I also want to log all the output with timestamps so I can track the process. Is there a way to achieve this?
4 Answers
If you’re looking for a method like tmux or screen, keep in mind those tools are more common in Unix environments. However, on Windows, you could utilize PowerShell or similar tools to achieve a background task.
Just curious, why are you mixing .bat files with LLMs for posting here? You good, bro?
Using AWS Systems Manager (SSM) is a solid option too! By registering your on-prem server with SSM, you can remotely manage and execute your sync task. It allows you to run commands in the background and log outputs directly to CloudWatch. If you set it up right, you won’t have to worry about the local terminal.
You might want to consider setting up a scheduled task for your batch file. This way, you can configure it to run whether you're logged in or not, which means it won't stop if you close the Command Prompt. Just make sure to set the task to run in the background and handle logging.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures