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

[Feature] s5cmd cp all versions of a single key #762

Open
skeggse opened this issue Oct 2, 2024 · 1 comment
Open

[Feature] s5cmd cp all versions of a single key #762

skeggse opened this issue Oct 2, 2024 · 1 comment

Comments

@skeggse
Copy link
Contributor

skeggse commented Oct 2, 2024

I sometimes have a bucket with versioning enabled, and I want to get copies of all the versions of a given object key. I can do that by using aws s3api list-object-versions, extracting the VersionId, and then execing s5cmd cp --version-id <id> over all the versions, but this seems like a problem s5cmd could solve directly - provide a --all-versions option, or accept some --versions-file containing all the versions I want to download - without requiring a bunch of process execution overhead!

@kucukaslan
Copy link
Contributor

kucukaslan commented Nov 17, 2024

how should that work?

s5cmp cp s3://bucket/key .

will download it to

./key

but if all versions needs to be downloaded file name cannot be inferred from the key. So there should be a way to map different versions to different file names.

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

No branches or pull requests

2 participants