feat(cp): copy objects across aliases via download and upload - #353
Merged
Conversation
Same-alias copies keep using server-side CopyObject. When the source and destination aliases differ, rc cp now streams through a temporary file and uploads with the destination credentials so recursive and single object copies no longer fail with unsupported_feature. Co-authored-by: RustFS <hello@rustfs.com>
Add recursive download/upload coverage, same-alias client-cache behavior, and user-metadata forwarding. Mark the protected cp contract with a BREAKING migration note for the additive change. Co-authored-by: RustFS <hello@rustfs.com>
The previous synchronize event ran before the PR body included BREAKING. This empty commit re-runs CI against the updated description. Co-authored-by: RustFS <hello@rustfs.com>
houseme
marked this pull request as ready for review
August 25, 2026 02:38
cxymds
reviewed
Aug 25, 2026
cxymds
reviewed
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
rc cpalready performs same-alias S3-to-S3 copies with server-side CopyObject, including recursive prefix copies. Copies between different aliases failed withunsupported_feature, even thoughrc mirroralready downloads and re-uploads across aliases. Operators had to stage through a local path or switch to mirror.Solution
--metadata-directive replaceis set.This is additive. Same-alias CopyObject behavior is unchanged.
This PR must be marked BREAKING because
docs/reference/rc/cp.mdis a protected CLI behavior contract. The change is additive; no JSON schema or configschema_versionbump applies.Tests
x-amz-copy-source; upload forwardsx-amz-meta-*from the source HEADscripts/regression/cross-alias-copy.shValidation
cargo fmt --all cargo clippy --workspace -- -D warnings cargo test --workspace ./scripts/regression/cross-alias-copy.sh