问题
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