|
|
Log in / Subscribe / Register

Deprecating scp

Deprecating scp

Posted Nov 6, 2020 10:32 UTC (Fri) by gray_-_wolf (subscriber, #131074)
In reply to: Deprecating scp by marcH
Parent article: Deprecating scp

> tl;dr: cp -R is insane, use rsync -a. Using it more than once is not just safer it's also much faster of course: it can be used as an actual backup tool.

Does rsync -a also use CoW the way cp does as long as the filesystem supports it?


to post comments

Deprecating scp

Posted Nov 6, 2020 12:48 UTC (Fri) by Wol (subscriber, #4433) [Link] (1 responses)

Dunno what option it is (and I don't think it's -a), but rsync does have an option that says "only write stuff that's changed". Great for making backups on a journalled file system as each snapshot is a full backup, but apart from the first only takes up the space of an incremental... (and yes for large files eg databases it only writes that part of the file)

Cheers,
Wol

Deprecating scp

Posted Nov 19, 2020 17:46 UTC (Thu) by nye (guest, #51576) [Link]

> rsync does have an option that says "only write stuff that's changed"

--inplace --no-whole-file

By default rsync will only use --whole-file if both source and destination are local, so the second option is redundant in that case.

Deprecating scp

Posted Nov 6, 2020 12:50 UTC (Fri) by nix (subscriber, #2304) [Link] (2 responses)

No, and apparently it never will use reflinks because it is out of scope. It also can't copy the filesystem-specific attributes (like the immutable flag) set via chattr/lsattr. Patches to do this have been proposed and rejected :(

Deprecating scp

Posted Nov 19, 2020 22:27 UTC (Thu) by rodgerd (guest, #58896) [Link] (1 responses)

That's very disappointing. What was the rationale?

Deprecating scp

Posted Nov 20, 2020 22:46 UTC (Fri) by nix (subscriber, #2304) [Link]

That it was "out of scope", that rsync's job was to copy files, and nonportable stuff doesn't count. (I guess they define what is "nonportable".)


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds