not a regular file: trying to download a directly using scp

I am trying to make a backup of some files onto my local computer using scp.
Here is what I tried:

scp root@my_linode_IP:path/to/folder/htdocs/wp-content/uploads/* C:/wpuploads

The folder "uploads" consists of more directories, and I need to download all of them. The issue is that the folders do not get downloaded as they are flagged: "not a regular file".

The other files in the base folder are downloaded with no problems. Is there a way to download entire subdirectories directly?

1 Reply

Right, a directory is not a regular file.

You want scp -r

Where -r means recursively process directories.

Or try rsync command it's much faster:

rsync -rv root@my_linode_IP:path/to/folder/htdocs/wp-content/uploads/ C:/wpuploads/

Or, since you appear to be doing this in Windows (the "C:") - try a graphical tool like WinSCP, it's free and works good.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct