Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 从远程工作站将后端文件传输到计算引擎_Google Cloud Platform_Google Compute Engine_File Transfer_Scp_Cp - Fatal编程技术网

Google cloud platform 从远程工作站将后端文件传输到计算引擎

Google cloud platform 从远程工作站将后端文件传输到计算引擎,google-cloud-platform,google-compute-engine,file-transfer,scp,cp,Google Cloud Platform,Google Compute Engine,File Transfer,Scp,Cp,我遵循quickstart在运行Debian os的计算引擎上部署一个简单的java web应用程序。我很难理解用于将文件从远程工作站传输到计算引擎实例的命令。有人能举例说明如何使用这些吗 gcloud compute scp --scp-flag=-pr ../../endpoints [INSTANCE-NAME]:~/ gcloud compute scp ../../pom.xml [INSTANCE-NAME]:~/ 将web应用程序文件从我的桌面传输到计算引擎的命令。将信息从本

我遵循quickstart在运行Debian os的计算引擎上部署一个简单的java web应用程序。我很难理解用于将文件从远程工作站传输到计算引擎实例的命令。有人能举例说明如何使用这些吗

gcloud compute scp --scp-flag=-pr ../../endpoints [INSTANCE-NAME]:~/
  gcloud compute scp ../../pom.xml [INSTANCE-NAME]:~/

将web应用程序文件从我的桌面传输到计算引擎的命令。

将信息从本地计算机发送到虚拟机:

$ gcloud compute scp <local-path-to-file> vm:<path-to-dir> --zone <instance-zone>
$gcloud compute scp vm:--区域
例如,如果要将当前目录中名为my local file的本地文件复制到区域us-east1-b中名为my-VM-1的远程VM,并将该文件放入文件夹/home/user me中,您可以执行以下操作:

gcloud compute scp./my本地文件my-vm-1:/home/user me--zone us-east1-b

您可以对目录使用--recurse选项,如下所示:

gcloud compute scp--递归/我的本地文件my-vm-1:/home/user me--区域us-east1-b


ssh密钥将传播,有关传输进度的状态显示在终端窗口上

如果我需要传输一个包含许多文件的目录和一个包含许多文件的后续文件夹(如web应用程序),那么该命令应该如何修改?您可以对目录使用--recurse选项,如下所示:gcloud compute scp--recurse./my local file my-vm-1:/home/user me--zone us-east1-bOh耶!!我得到了它。非常感谢。