I have backup space that is accessible by SFTP. I have made a backup in a directory called "mybackup" on this remote storage. I would now like to make a copy of the mybackup directory called "mybackup-copy" also on the remote storage.
Is there a way to do this with SFTP that doesn't involve downloading the whole directory and then re-uploading the whole directory?
As in, if I had full SSH shell access I could do cp -ar mybackup mybackup-copy
- can this be achieved with the sftp protocol?
scp
? When usingscp remote_location1 remote_location2
, scp copies directly between location1 and location2, unless you use-3
parameter.-3
transfers files from remote 1 to the machine performing the scp command, and then to remote2. I suspect scp without-3
might be able to do it. https://man7.org/linux/man-pages/man1/scp.1.html – nobody Nov 09 '20 at 12:26