23

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.

animuson
  • 53,861
  • 28
  • 137
  • 147
Rajeev Roy
  • 285
  • 1
  • 2
  • 5
  • 5
    I have found the way for this issue. In my case pscp -r -scp user@host:public_html/* D:\sites\ is working fine. – Rajeev Roy Apr 17 '12 at 06:30

3 Answers3

51

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

pscp -r user@host:public_html/* d:\sites\;
Wisco crew
  • 1,337
  • 1
  • 17
  • 25
4

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.

vikram eklare
  • 800
  • 7
  • 25
0

One important thing: You need to define the port number over here "-P 22".

pscp -r -P 22 user@host:public_html/* D:\sites

In my case, it works when I use port number 22 with the above script.

farhan ayub
  • 164
  • 4