1
votes

everyone, how can i copy the google cloud bucket files to google cloud vm instance??

as I try this command, gsutil cp gs://xxx.com/photo.tar.gz myvm-vm:/var/www/html/

it show me this error:

Copying gs://xxx.com/poto.tar.gz... Skipping attempt to download to filename ending with slash (myvm-vm::\var\www\html)). This typically happens when using gsutil to download from a subdirectory created by the Cloud Console (https://cloud.google.com/console)

Operation completed over 1 objects/11.2 GiB.

1

1 Answers

2
votes

The error that is prompting you means that is trying to access to a file ending with slash (myvm-vm::\var\www\html). That's not the correct way to do that, instead, you have to ssh into your Compute Engine instance (with at least "Storage Read only" permissions) and then run the command

sudo gsutil cp gs://<YOUR_BUCKET_NAME>/<YOUR_FILE_NAME> /var/www/html/