Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Mirroring" should prune files at the destination not found at source #213

Closed
chipzoller opened this issue Aug 17, 2020 · 5 comments · Fixed by #248
Closed

"Mirroring" should prune files at the destination not found at source #213

chipzoller opened this issue Aug 17, 2020 · 5 comments · Fixed by #248

Comments

@chipzoller
Copy link

There either needs to be a switch in the cp command to prune files at the destination not found at the source, or the existing behavior should be altered to more accurately reflect how "mirroring" is defined. When a directory is "mirrored" to a target directory, that means at the end of the operation, the two should be identical. With s5cmd using the -n -s -u switches does not produce this result and only adds files not found at the target.

@chipzoller
Copy link
Author

When using the term "mirroring" I'm referring to the help for s5cmd cp:

09. Mirror a directory to target S3 prefix
     > s5cmd cp -n -s -u dir/ s3://bucket/target-prefix/

10. Mirror an S3 prefix to target S3 prefix
    > s5cmd cp -n -s -u s3://bucket/source-prefix/* s3://bucket/target-prefix/

@chipzoller
Copy link
Author

Any comment on this or?

@igungor
Copy link
Member

igungor commented Sep 14, 2020

You're right. The wording of "mirror" is incorrect in this context. We should change it to something more accurate.

@chipzoller
Copy link
Author

Alternatively, add an action "mirror" option that performs mirroring.

@igungor
Copy link
Member

igungor commented Nov 5, 2020

Mirroring (or sync) is requested before at #3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants