How does `scp` differ from `rsync`?

后端 未结 7 2034
失恋的感觉
失恋的感觉 2020-12-04 04:58

An article about setting up Ghost blogging says to use scp to copy from my local machine to a remote server:

scp -r ghost-0.3 root@*your-server-         


        
7条回答
  •  抹茶落季
    2020-12-04 05:23

    One major feature of rsync over scp (beside the delta algorithm and encryption if used w/ ssh) is that it automatically verifies if the transferred file has been transferred correctly. Scp will not do that, which occasionally might result in corruption when transferring larger files. So in general rsync is a copy with guarantee.

    Centos manpages mention this the end of the --checksum option description:

    Note that rsync always verifies that each transferred file was correctly reconstructed on the receiving side by checking a whole-file checksum that is generated as the file is transferred, but that automatic after-the-transfer verification has nothing to do with this option’s before-the-transfer “Does this file need to be updated?” check.

提交回复
热议问题