Skip to main content

Copy Files from/to Remote

Copy file to remote

gcloud compute scp /path/in/local $GCP_INSTANCE_NAME:/path/in/remote --zone=$GCP_ZONE --tunnel-through-iap 

Copy folder to remote

gcloud compute scp /path/in/local $GCP_INSTANCE_NAME:/path/in/remote --zone=$GCP_ZONE --tunnel-through-iap --recurse 

Copy file from remote

gcloud compute scp $GCP_INSTANCE_NAME:/path/in/remote /path/in/local --zone=$GCP_ZONE --tunnel-through-iap