Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to continue broken scp (secure copy) command process in Linux? [closed]

People also ask

How do you continue interrupted scp?

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.

Does scp continue after disconnect?

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.

Can scp be paused?

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).

How do I run a scp command in the background in Linux?

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/.