question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gsutil cp missing --parents

See original GitHub issue

gsutil cp does not offer the --parents flag. for example, doing gsutil cp gs://my-bucket/**/pom.xml . will end up with only one file on disk rather than all of the pom.xml files in the bucket. I would like to have cp preserve the parents of each copied file as in cp --parents on GNU cp.

Achieving this functionality by copying one by one and specifying the destination from outside gsutil is possible but slow.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:7
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MariusGheorghecommented, Feb 3, 2021

Thanks for your reply. Well, I see that people made PRs for this 4.5 years ago and nothing was done. So I doubt that making another PR would change anything.

0reactions
MariusGheorghecommented, Feb 3, 2021

I was referring to the comment of @lawortsmann

From what I can find, there doesn’t seem to be any progress on adding this feature in any pull requests. If I have some bandwidth in the next couple of weeks I may try to work on implementing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

cp - Copy files and objects | Cloud Storage - Google Cloud
The gsutil cp command allows you to copy data between your local file system and the cloud, within the cloud, and between cloud...
Read more >
gsutil cp using -I and -r will copy all files into one directory
I am looking for something similar to GNU cp --parents, that will create the parent directories when copying a file.
Read more >
Using gsutil to Perform Operations on Buckets and Objects
In this command, the -d option deletes files from the target if they're missing in the source (in this case, it deletes app.yaml...
Read more >
When executing "gsutils cp" in python script I get Error ...
This error means that the Linux user is not set up or you are using the root user. gsutil (gcloud) must be initialized...
Read more >
gsutil_3.34.ReleaseNotes.txt
Added doc warnings about losing version ordering if using gsutil -m cp between versioned buckets; ... the parent process would immediately stop execution, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found