Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PSCP copy files from godaddy to my windows machine

Tags:

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.

like image 702
Rajeev Roy Avatar asked Apr 13 '12 06:04

Rajeev Roy


People also ask

How do I transfer files using Pscp?

To copy a file or files using PSCP, open a command window and change to the directory in which you saved pscp.exe. Then type pscp, followed by the path that identifies the files to copy and the target directory, as in this example. Press Enter, then follow your usual authentication procedures to execute the transfer.

How do I transfer files from PuTTY to my desktop?

To get files you use a related program, pscp.exe, included with PuTTY. Run the pscp.exe executable on the Windows command line to quickly copy files from a remote PC to the local computer hard drive.

How do I copy files from a remote to a local server?

To copy the files you will need to first invoke the SCP, followed by the remote username@IP address, path to file. If you do not specify the path, it is assumed as default in this case which will be the user's home directory, this will be followed the path where the file will be stored locally.

What is the difference between Pscp and SCP?

There are none. scp (Secure CoPy) is a protocol and command line utility for secure file transfer; and pscp is just the name of PuTTy SCP/SFTP client. The security of SCP is provided by SSH, which is used for data transfer and authentication.


2 Answers

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

pscp -r user@host:public_html/* d:\sites\; 
like image 172
Wisco crew Avatar answered Sep 28 '22 22:09

Wisco crew


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.

like image 33
vikram eklare Avatar answered Sep 28 '22 21:09

vikram eklare