abcdw,
@abcdw@fosstodon.org avatar

Today I learned: if the scp (utility for copying files over SSH) process was interrupted, you can resume the transfer of the file(s) with rsync!

Especially handy with low-bandwidth and unstable connection.

Experimenting with almost forgotten old good stuff can have its own perks!

efraim,
@efraim@tooot.im avatar

@abcdw
Also instead of running 'wget foo' you can use 'aria2c foo', and if you get interrupted you can continue with 'aria2c -c foo'

sqrtminusone,
@sqrtminusone@emacs.ch avatar

@efraim @abcdw wget also has -c. The question is whether the server supports range requests; many do not.

abcdw,
@abcdw@fosstodon.org avatar

@sqrtminusone @efraim you can upload with wget over ssh?

efraim,
@efraim@tooot.im avatar

@abcdw
@sqrtminusone
While I wouldn't be surprised if the answer is yes, I'm going to say no. Those cli programs are grouped together in my mind, that's why I brought it up.

abcdw,
@abcdw@fosstodon.org avatar

@efraim @sqrtminusone Ok :)
I just used scp for uploading and realized, that I can resume uploading using rsync, which was reaaally handy in my case.

sqrtminusone,
@sqrtminusone@emacs.ch avatar

@abcdw @efraim Don't know if that's ironic or not :-) wget over ssh is definitely not an option, wget supports only HTTP, HTTPS, and FTP.

Also, resuming a download with rsync is not quite the same as wget with HTTP+Range header. The Range header simply means "send the message from this byte to this", which can be used to resume broken downloads or parallel download of the same file if Content-Length is present.

And rsync employs its "delta transfer algorithm", which is essentially an efficient way to synchronize changes between files. So, in addition to resuming a broken download, it can sync two large files by transferring only the differences and keeping the matching parts intact, for instance.

So, y'know, you don't need scp at all, rsync offers a superset of scp capabilities :D Even the devs agree:

> The scp protocol is outdated, inflexible and not readily fixed. We recommend the use of more modern protocols like sftp and rsync for file transfer instead.

See https://www.openssh.com/txt/release-8.0

abcdw,
@abcdw@fosstodon.org avatar

@sqrtminusone @efraim Not ironic, but my use case was an uploading of a big file to the server where I have ssh access and rsync allowed to continue the upload from interrupted scp, which is what I was sharing here in the post :)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • til
  • kavyap
  • DreamBathrooms
  • cisconetworking
  • osvaldo12
  • ethstaker
  • magazineikmin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • rosin
  • slotface
  • everett
  • mdbf
  • tacticalgear
  • JUstTest
  • ngwrru68w68
  • tester
  • cubers
  • khanakhh
  • GTA5RPClips
  • Durango
  • normalnudes
  • modclub
  • Leos
  • megavids
  • provamag3
  • anitta
  • lostlight
  • All magazines