How to download a file/folder from remote (openshift) to local system

試著忘記壹切 提交于 2019-12-04 21:12:46

问题


How to download or backup or to save a copy of a file from openshift remote folder into my local-system folder using rhc client tool? or is there any other way other than rhc client tool to make a backup of it to my local system?

Also, Is there a way to copy an entire folder from remote(openshift) to local?


回答1:


Use winscp (if on windows) to ssh into your openshift app. Navigate to your folder. Drag and drop folder or files to local machine.

Filezilla - using filezilla and sftp with openshift




回答2:


First, tar and gzip your folder on the server within a ssh session, the syntax is:

rhc ssh <app_name>
tar czf <name_of_new_file>.tar.gz <name_of_directory>

Second, after you have disconnected from the openshift server (with CTRL-D), download this file to your local system:

rhc scp <app_name> download <local_destination> <absolute_path_to_remote_file>

Then on your local machine you can extract the file and perform your actions.



来源:https://stackoverflow.com/questions/27719268/how-to-download-a-file-folder-from-remote-openshift-to-local-system

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!