sync --delete command removed all local files in AWS S3

0 votes

aws s3 sync -- delete deleted few of the newly generated files.

I had few files in the s3 bucket which I want to sync it to the server. I used the above command but it deleted all the files and did not sync with the server. 

Is there any other way to do it or help me with this.

Jul 18, 2018 in Cloud Computing by code_ninja
• 5,920 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
aws sync is not used for deleting the files, it only copies or modifies the files.

-- delete is used to delete files from the destination and not from the source or rather deletes the files that are not present in S3.

If your aim to copy files to S3 and then to the local directory.

use aws sync command without delete. It will copy all the files to S3 and sycn it to the local directory without deleting any files.

Keep Learning :)
answered Jul 18, 2018 by Gopalan
• 1,260 points

Related Questions In Cloud Computing

0 votes
1 answer

AWS: Is there a way I can edit files in S3 right away in the browser?

There is not currently an AWS-supported method ...READ MORE

answered Jun 19, 2018 in Cloud Computing by Meci Matt
• 9,400 points
+3 votes
3 answers

Is it possible to delete a API in AWS API Gateway?

Yes, it is possible to delete an ...READ MORE

answered Mar 27, 2018 in Cloud Computing by brat_1
• 7,080 points
+4 votes
2 answers

Amazon S3 Permission problem - How to set permissions for all files at once?

This can be done by setting the ...READ MORE

answered Mar 27, 2018 in Cloud Computing by brat_1
• 7,080 points
+4 votes
2 answers

How come AWS S3 is erasing my extension from PDF files?

I think the problem should be with ...READ MORE

answered Mar 27, 2018 in Cloud Computing by code_ninja
• 5,920 points
+13 votes
2 answers
+1 vote
2 answers

AWS CloudWatch Logs in Docker

The awslogs works without using ECS. you need to configure ...READ MORE

answered Sep 6, 2018 in AWS by bug_seeker
• 15,300 points
0 votes
1 answer

How to delete the files from AWS S3 except the recently 5 added/updated files?

Use AWS s3 rm command with multiple --exclude options as shown: aws ...READ MORE

answered Jul 30, 2018 in Cloud Computing by Gopalan
• 1,260 points

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.