How to Run an S3 Sync from a .bat File in Background with Logging?

0
13
Asked By SunnyExplorer98 On

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

Answered By TechSavvyDude On

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.

Answered By BashBrawler22 On

Just curious, why are you mixing .bat files with LLMs for posting here? You good, bro?

Answered By CloudGuru77 On

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.

Answered By CryptoNerd123 On

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.