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
• 6,220 points
54 views

1 answer to this question.

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,420 points
26 views
+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
581 views
+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
43 views
+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
• 6,220 points
81 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
124 views
+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,350 points
315 views
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
101 views