Can awscli-sync ignore deleted files at the destination #7727
-
We need to sync local directory (src) to s3 (dest). But we do not want to copy deleted files at the destination (s3, in this case) again, otherwise it would cause duplicate processing again. (may sound like primitive queue, due to that nature of the existing implementation we cannot use queue or other mechanism ) Is there a way to ignore deleted files at the destination like using We could not find any option which does that, so we thought using
Thanks a lot for your time & help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @PackiarajSakkananGW, thanks for reaching out. To clarify your ask, when you say "deleted files", do you mean files that you've already uploaded and then deleted from your S3 bucket, or something else? Thanks! |
Beta Was this translation helpful? Give feedback.
If the current version of an object is a delete marker when you make a request, then the header
x-amz-delete-marker: true
is included in the response. You could try including / excluding files to upload using that header to determine if a file was deleted. Here is some relevant documentation that might be helpful.I wasn't able to find any reference to custom sync strategies. Could you elaborate more on that?