PSCP copy files from godaddy to my windows machine

一世执手 提交于 2019-12-03 16:19:16

问题


I want to take backup of my website which is hosted on godaddy.

I used pscp command from my windows dos and try to download whole public_html folder. my command is :

pscp -r user@host:public_html/ d:\sites\;

Files are downloading properly and folders also. But the issue is public_html and other subfolders has two folder like "./" and "../". Due to these two folders my copy is getting failed and I am getting "security violation: remote host attempted to write to " a '.' or '..' path!"error.

Hope any one can help for this. Note : I have only ssh access and have to download it from ssh commands itself.


回答1:


Appending a star to the source should fix it, e.g.

pscp -r user@host:public_html/* d:\sites\;



回答2:


Also you can do same thing by not adding '/' at the end of your source path. For eg.

pscp -r user@host:public_html d:\sites

Above command will create public_html directory if not exists at your destination (i.e. d:\sites). Simply we can say using above command we can make a as it is clone of public_html at d:\sites.



来源:https://stackoverflow.com/questions/10136326/pscp-copy-files-from-godaddy-to-my-windows-machine

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