Google compute engine 将文件从GCE导出到我的本地计算机

Google compute engine 将文件从GCE导出到我的本地计算机,google-compute-engine,gcutil,Google Compute Engine,Gcutil,gcutil push是否有反向命令基本上我想做的是在本地机器上有一个python文件的副本,因此我正在寻找一种方法将文件导入到本地机器中,从我的google计算引擎实例导出它们,而不使用GIT或任何其他源代码控制工具是的,有gcutil pull。以下是帮助文件: Local:~ mark$ gcutil help pull Command line tool for interacting with Google Compute Engine. Please refer to http:

gcutil push是否有反向命令基本上我想做的是在本地机器上有一个python文件的副本,因此我正在寻找一种方法将文件导入到本地机器中,从我的google计算引擎实例导出它们,而不使用GIT或任何其他源代码控制工具

是的,有gcutil pull。以下是帮助文件:

Local:~ mark$ gcutil help pull

Command line tool for interacting with Google Compute Engine.

Please refer to http://developers.google.com/compute/docs/gcutil/tips for more
information about gcutil usage.


USAGE: gcutil [--global_flags] <command> [--command_flags] [args]


pull                         Pull one or more files from a VM instance.

                         Usage: gcutil [--global_flags] pull
                         [--command_flags] <instance-name> <file-1> ...
                         <file-n> <destination>

                         Flags for pull:

gcutil_lib.instance_cmds:
  --ssh_arg: Additional arguments to pass to ssh;
repeat this option to specify a list of values
(default: '[]')
  --ssh_key_push_wait_time: Number of seconds to wait for updates to
project-wide ssh keys to cascade to the instances within the project
(default: '120')
(an integer)
  --ssh_port: TCP port to connect to
(default: '22')
(an integer)
  --zone: [Required] The zone for this request.

gflags:
--flagfile: Insert flag definitions from the given file into the command line.
(default: '')
--undefok: comma-separated list of flag names that it is okay to specify on
the command line even if the program does not define a flag with that name.
IMPORTANT: flags in this list that have arguments MUST use the --flag=value
format.
(default: '')


Run 'gcutil --help' to get help for global flags.
Run 'gcutil help' to see the list of available commands.
Local:~mark$gcutil help pull
用于与Google计算引擎交互的命令行工具。
请参阅http://developers.google.com/compute/docs/gcutil/tips 更多
有关gcutil用法的信息。
用法:gcutil[--全局_标志][--命令_标志][args]
从VM实例中提取一个或多个文件。
用法:gcutil[--global_flags]pull
[--命令\u标志]。。。
拉旗:
gcutil_lib.instance_cmds:
--ssh_arg:要传递给ssh的附加参数;
重复此选项以指定值列表
(默认值:“[]”)
--ssh_key_push_wait_time:等待更新的秒数
用于级联到项目内实例的项目范围ssh密钥
(默认值:“120”)
(整数)
--ssh_端口:要连接到的TCP端口
(默认值:“22”)
(整数)
--区域:[必需]此请求的区域。
gflags:
--flagfile:将给定文件中的标志定义插入命令行。
(默认值:“”)
--undefok:可以指定的标志名称的逗号分隔列表
命令行,即使程序没有用该名称定义标志。
要点:此列表中具有参数的标志必须使用--flag=值
格式。
(默认值:“”)
运行“gcutil--help”获取全局标志的帮助。
运行“gcutil帮助”查看可用命令的列表。

将文件从本地计算机上载到GCE的语法如下所示

gcutil push--zone=us-central1-a\ 我的例子\ ~/local/path /远程/文件1\ /远程/文件2\

例如在mac中

范例

gcutil push --zone=us-central1-a \your-instance\  ~/Desktop/Gcloud /home/munish/
gcutil pull --zone=us-central1-a \your-instance \ /home/munish/source-folder ~/Desktop/destination-folder

文件从GCE下载到本地计算机的语法如下

gcutil拉力——区域=us-central1-a\ 我的例子\ /远程/文件1\ /远程/文件2\ ~/local/path

例如在mac中

范例

gcutil push --zone=us-central1-a \your-instance\  ~/Desktop/Gcloud /home/munish/
gcutil pull --zone=us-central1-a \your-instance \ /home/munish/source-folder ~/Desktop/destination-folder