Rajeev Roy
Rajeev Roy

Reputation: 285

PSCP copy files from godaddy to my windows machine

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.

Upvotes: 23

Views: 21071

Answers (3)

farhan ayub
farhan ayub

Reputation: 60

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.

Upvotes: 0

vikram eklare
vikram eklare

Reputation: 830

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.

Upvotes: 4

Wisco crew
Wisco crew

Reputation: 1367

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

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

Upvotes: 51

Related Questions