Question

Transfer files with scp - getting older files

Posted October 4, 2021 88 views
Linux Commands

I am able to do scp from local to a specific directory.
I just tried copying down an sql dump from my local.

scp -r root@X.X.X.X:/home/userme ./

With this, it does download files, but I got a really old sql that I have since deleted. When I try to do specific newer files, it says:
‘No such file or directory’

I have not succeeded in the direction of doing it from the droplet terminal down to my local. I get permission denied when I tried that.

I had a lot of success of doing images (wp-content) from local up and down to the droplet. Looks like I had success with an sql file as well (this was two weeks ago). But today it is giving me old files.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @leorawe,

It’s the matter of what you have at the location you are doing the scp on your droplet.

You might be getting old files just because the files in there are that old. What I’ll recommend is to SSH to your droplet go to the directory you wish to download the files there and list them - ls. Check what’s the proper name, what have you been downloading and so on.

All on all, I don’t think the issue is with SCP rather than with the content of the directory you are downloading from.

Regards,
KFSys

  • I did ls -al many times, as well as pwd to get my location.

    When doing scp on the droplet directory, what is the syntax? What do I write to download from that directory into, say, my Downloads folder on my local? Maybe I am missing a command. Or maybe I need to set certain permissions? Is it OK if I am leoraw or if I am root? Does that matter? Do I need a port?