Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to do a backup on a website, but I need to download locally to a folder on my hard drive.

Example: scp -> MyMac/Documents/Backup

This can be done via shell, Terminal, etc. What is the best method for this?

share|improve this question

scp [user@] ~/Documents/Backup/ will do what you want.

The scp(1) manual page has the details, but the syntax scp ${from} ${to}, where from and to are of the form: ${host}:${path} or ${path}.

You might also be interested in sftp, which is an FTP-like interactive experience, rather than the command-line scp experience; sftp will get you going there.

share|improve this answer
Thank you for the answer.i try this scp ~/Documents/Backup/ but not works – Thomas Feb 1 '12 at 0:34
You will have to include the error message to have a hope of anyone else telling you why. Did you literally type in there? You can't just copy and paste my example, you need to use the name of your system and all. – Daniel Pittman Feb 1 '12 at 0:35
yes,i use my host and username..but "Permission denied, please try again." – Thomas Feb 1 '12 at 0:44
It could by the file has the wrong permissions, you got your login details wrong, the server only allows key based logins, or they have disabled scp. The last is very unlikely, though, because scp is very little different to ssh cat /path/to/file and all. – Daniel Pittman Feb 1 '12 at 1:00
In case it is unclear, you should run the command on your local machine. – Nathan Grigg Feb 2 '12 at 0:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .