If you want to resume an interrupted SCP transfer, you need to rely on other programs which support range requests. One popular such program is rsync . Similar to scp , rsync can also transfer files over SSH. Suppose you were trying to download a file ( bigdata.
Yes, if both ends support sftp - after scp remoteuser@remotehost:/absolute/filename . fails you can resume by doing sftp remoteuser@remotehost and then reget /absolute/filename to resume the download. Show activity on this post.
You can pause a process with SIGSTOP and later continue it with SIGCONT. (See kill -l for a list of signals and use ps to get the process ID).
bg -> Send job to background. Show activity on this post. You can use jobs command to check the processes. For example jobs -l will list all running processes along with the process id.
If you need to resume an scp transfer from local to remote, try with rsync:
rsync --partial --progress --rsh=ssh local_file user@host:remote_file
Short version, as pointed out by @aurelijus-rozenas:
rsync -P -e ssh local_file user@host:remote_file
In general the order of args for rsync is
rsync [options] SRC DEST
This is all you need.
rsync -e ssh file host:/directory/.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With