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,300 points
8,213 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.

To know more about Migrating to AWS, join our AWS Cloud Migration Certification. Also, If you wish to master the principles in AWS and work on step-by-step tasks that have significant relevance for the world of business, industry professionals developed the AWS syllabus.

Keep Learning :)

answered Jul 18, 2018 by Gopalan
• 1,360 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,460 points
5,147 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,200 points
4,635 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,200 points
3,958 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,300 points
3,907 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,942 views
+1 vote
2 answers

AWS CloudWatch Logs in Docker

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

answered Sep 7, 2018 in AWS by bug_seeker
• 15,520 points
1,964 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,360 points
3,792 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP