Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable progress output aws s3 sync without disabling all output

Is there any way to disable the

Completed 1 of 12 part(s) with 11 file(s) remaining...

progress output with the aws s3 sync command (from the aws cli tools).

I know there is a --quiet option but I don't want to use it because I still want the Upload... details in my logfile.

Not a big issue, but creates mess in the logfile like:

Completed 1 of 12 part(s) with 11 file(s) remaining^Mupload: local/file to s3://some.bucket/remote/file

Where ^M is a control character.

like image 778
Sodved Avatar asked Jan 21 '16 09:01

Sodved


People also ask

How do I stop aws from S3 from syncing?

So, just use Ctrl+C to stop the process. (The Cancel command you linked is to stop a Systems Manager (SSM) job running on AWS. It is not related to work done by the AWS CLI.) Save this answer.

Does AWS S3 sync overwrite?

Simply upload your new file on top of your old file to replace an old file in an S3 bucket. The existing file will be overwritten by your new file.

Does S3 sync delete files?

Typically, s3 sync copies missing or outdated files or objects between the source and target. However, you can also supply the --delete option to remove files or objects from the target that are not present in the source.

Is AWS S3 sync recursive?

Syncs directories and S3 prefixes. Recursively copies new and updated files from the source directory to the destination. Only creates folders in the destination if they contain one or more files.


1 Answers

As of October 2017, it is possible to only suppress upload progress with aws s3 cp and aws s3 sync by using the --no-progress option:

--no-progress (boolean) File transfer progress is not displayed. This flag is only applied when the quiet and only-show-errors flags are not provided.

Example:

aws s3 sync /path/to/directory s3://bucket/folder --no-progress

Output:

upload: /path/to/directory to s3://bucket/folder
like image 166
enharmonic Avatar answered Sep 19 '22 11:09

enharmonic