gsutil cp command error, CommandException: NO URLs matched:

扶醉桌前 提交于 2020-08-08 07:13:52

问题


Good day, I am not a developer but running simple gsutil command to manage my google cloud storage.

I ran into an issue where I run the following command form the cmd

gsutil -m cp -r gs:/bucket/ .

Scenario1: with most buckets this goes just fine

Scenario2: there is one bucket where I get an error and I really have no clue how this is possible

the error I get is:

CommandException: NO URLs matched: gs://content-music.tapgamez.com/

I am hoping anyone can share their thoughts with me

thnx


回答1:


One scenario where this error message appears is when the bucket you're attempting to recursively copy from contains no objects, e.g.:

$ gsutil mb gs://some-random-bucket-name
$ gsutil -m cp -r gs://some-random-bucket-name/ .
CommandException: No URLs matched: gs://some-random-bucket-name/
CommandException: 1 file/object could not be transferred.

The same issue, but for the rm command, is being tracked on GitHub: https://github.com/GoogleCloudPlatform/gsutil/issues/417




回答2:


gsutil command rsync doesn't seem to have this issue (working fine even on empty buckets). Try it to see if it will do that you need. Docs

gsutil rsync -r gs://mybucket1 gs://mybucket2


来源:https://stackoverflow.com/questions/47885197/gsutil-cp-command-error-commandexception-no-urls-matched

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!