Skip to content

Conversation

@johnmantios
Copy link
Contributor

@johnmantios johnmantios commented Oct 31, 2025

Closes #8683

Change Description

Background

All the API functionality for copying exists, but not the cli command

New Feature

new cp command. Usage is like following:

$ lakectl fs cp lakefs://repo/branch/source lakefs://repo/branch/some/dest

or recursively:

$ lakectl fs cp lakefs://repo/branch/sourceDir lakefs://repo/branch/some/dest --recursive

works both with and without slashes in the end in case of recursion

Testing Details

Manually. I didn't see any unit tests for cobra commands, if needed though I can explore

Breaking Change?

No

Additional info

./lakectl fs cp lakefs://quickstart/main/images lakefs://quickstart/main/data --recursive

log:

DEBUG [2025-10-31T13:52:34+01:00]usr/local/go/src/net/http/server.go:2294 net/http.HandlerFunc.ServeHTTP HTTP call ended host="127.0.0.1:8000" method=POST operation_id=CopyObject path="/api/v1/repositories/quickstart/branches/main/objects/copy?dest_path=data%2Fduckdb-editor-06.png" source_ip="127.0.0.1:62902" status_code=201 took=52966791 took_str=52.966791ms user=admin
DEBUG [2025-10-31T13:52:34+01:00]usr/local/go/src/net/http/server.go:2294 net/http.HandlerFunc.ServeHTTP HTTP call ended host="127.0.0.1:8000" method=POST operation_id=CopyObject path="/api/v1/repositories/quickstart/branches/main/objects/copy?dest_path=data%2Fhooks-03.png" source_ip="127.0.0.1:62898" status_code=201 took=82716458 took_str=82.716458ms user=admin
DEBUG [2025-10-31T13:52:34+01:00]usr/local/go/src/net/http/server.go:2294 net/http.HandlerFunc.ServeHTTP HTTP call ended host="127.0.0.1:8000" method=POST operation_id=CopyObject path="/api/v1/repositories/quickstart/branches/main/objects/copy?dest_path=data%2Fduckdb-main-03.png" source_ip="127.0.0.1:62892" status_code=201 took=90485333 took_str=90.485333ms user=admin

Contact Details

Slack + gmantios@gmail.com

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 this pull request may close these issues.

Add lakectl cp

1 participant