简体   繁体   中英

Moving a directory from local-machine to an instance in GCP

I am trying to move a folder from my local machine to the remote server in an instance of GCP:

gcloud compute scp --recurse myDirectory instance-1:~/Folder

It looks like it is uploaded (because I see the files uploading), but when I checked the folder at the remote server there is nothing. What I am doing wrong?

I have two projects and I set up gcloud with the suitable project.

The answer is inspired by: gcloud compute copy-files succeeds but no files appear

I needed to write username@instance, thus this works:

gcloud compute scp --recurse myDirectory username@instance-1:~/Folder

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM