Is there ever a reason to use scp instead of rsync?
Clash Royale CLAN TAG#URR8PPP
up vote
52
down vote
favorite
Is there a reason to use scp
instead of rsync
? I can see no reason for using scp
ever again, rsync
does everything that scp
does, with more safety (can preserve symlinks etc).
ssh rsync scp
 |Â
show 2 more comments
up vote
52
down vote
favorite
Is there a reason to use scp
instead of rsync
? I can see no reason for using scp
ever again, rsync
does everything that scp
does, with more safety (can preserve symlinks etc).
ssh rsync scp
6
Short answer: No. scp is never harmful.
â Shadur
May 31 '12 at 9:01
1
@Shadur scp is harmful in that it overwrites existing target files by default. So's rsync, but it at least allows limiting the possible damage with-u
.
â Gilles
May 31 '12 at 22:46
3
@Gilles As with any tool, you must understand what it does and how it does it to use it safely.
â Alex Chamberlain
Jun 1 '12 at 7:24
6
In that context, regularcp
andrm
would be considered "harmful" -- and if you define "harmful" as "can screw me over if I do something stupid",rsync
isn't any less harmful.
â Shadur
Jun 1 '12 at 9:31
1
On systems withoutrsync
installed, usingrsync
is (obviously) not even possible.
â Kusalananda
Feb 21 at 10:23
 |Â
show 2 more comments
up vote
52
down vote
favorite
up vote
52
down vote
favorite
Is there a reason to use scp
instead of rsync
? I can see no reason for using scp
ever again, rsync
does everything that scp
does, with more safety (can preserve symlinks etc).
ssh rsync scp
Is there a reason to use scp
instead of rsync
? I can see no reason for using scp
ever again, rsync
does everything that scp
does, with more safety (can preserve symlinks etc).
ssh rsync scp
ssh rsync scp
edited Jun 10 '12 at 22:00
Mikel
38.4k997125
38.4k997125
asked May 31 '12 at 7:02
mikebloch
369135
369135
6
Short answer: No. scp is never harmful.
â Shadur
May 31 '12 at 9:01
1
@Shadur scp is harmful in that it overwrites existing target files by default. So's rsync, but it at least allows limiting the possible damage with-u
.
â Gilles
May 31 '12 at 22:46
3
@Gilles As with any tool, you must understand what it does and how it does it to use it safely.
â Alex Chamberlain
Jun 1 '12 at 7:24
6
In that context, regularcp
andrm
would be considered "harmful" -- and if you define "harmful" as "can screw me over if I do something stupid",rsync
isn't any less harmful.
â Shadur
Jun 1 '12 at 9:31
1
On systems withoutrsync
installed, usingrsync
is (obviously) not even possible.
â Kusalananda
Feb 21 at 10:23
 |Â
show 2 more comments
6
Short answer: No. scp is never harmful.
â Shadur
May 31 '12 at 9:01
1
@Shadur scp is harmful in that it overwrites existing target files by default. So's rsync, but it at least allows limiting the possible damage with-u
.
â Gilles
May 31 '12 at 22:46
3
@Gilles As with any tool, you must understand what it does and how it does it to use it safely.
â Alex Chamberlain
Jun 1 '12 at 7:24
6
In that context, regularcp
andrm
would be considered "harmful" -- and if you define "harmful" as "can screw me over if I do something stupid",rsync
isn't any less harmful.
â Shadur
Jun 1 '12 at 9:31
1
On systems withoutrsync
installed, usingrsync
is (obviously) not even possible.
â Kusalananda
Feb 21 at 10:23
6
6
Short answer: No. scp is never harmful.
â Shadur
May 31 '12 at 9:01
Short answer: No. scp is never harmful.
â Shadur
May 31 '12 at 9:01
1
1
@Shadur scp is harmful in that it overwrites existing target files by default. So's rsync, but it at least allows limiting the possible damage with
-u
.â Gilles
May 31 '12 at 22:46
@Shadur scp is harmful in that it overwrites existing target files by default. So's rsync, but it at least allows limiting the possible damage with
-u
.â Gilles
May 31 '12 at 22:46
3
3
@Gilles As with any tool, you must understand what it does and how it does it to use it safely.
â Alex Chamberlain
Jun 1 '12 at 7:24
@Gilles As with any tool, you must understand what it does and how it does it to use it safely.
â Alex Chamberlain
Jun 1 '12 at 7:24
6
6
In that context, regular
cp
and rm
would be considered "harmful" -- and if you define "harmful" as "can screw me over if I do something stupid", rsync
isn't any less harmful.â Shadur
Jun 1 '12 at 9:31
In that context, regular
cp
and rm
would be considered "harmful" -- and if you define "harmful" as "can screw me over if I do something stupid", rsync
isn't any less harmful.â Shadur
Jun 1 '12 at 9:31
1
1
On systems without
rsync
installed, using rsync
is (obviously) not even possible.â Kusalananda
Feb 21 at 10:23
On systems without
rsync
installed, using rsync
is (obviously) not even possible.â Kusalananda
Feb 21 at 10:23
 |Â
show 2 more comments
7 Answers
7
active
oldest
votes
up vote
24
down vote
accepted
If you have to copy a large number of files, or have large files, rsync over ssh will be much faster than scp.
21
rsync
speeds up copies when the destination already has an older copy of the file(s) by sending only the changed parts, otherwise it is not faster thanscp
.
â psusi
May 31 '12 at 22:19
5
You can try it out yourself, or take someone elses word for it: digitalsanctuary.com/tech-blog/debian/⦠. Try scp vs rsync of your /usr/bin/ dir for example.
â Not Now
May 31 '12 at 22:43
1
It looks likescp
does have a problem with large numbers of small files. With a single large file though, both can easily saturate a 100 mbps lan.
â psusi
Jun 1 '12 at 14:32
1
Interesting.rsync
should have more overhead, since it needs to check in advance if the target(s) exists.
â Nils
Jun 10 '12 at 20:56
26
I don't see how this answers the question
â ericn
May 15 '15 at 2:11
 |Â
show 3 more comments
up vote
40
down vote
scp provides a cp like method to copy files from one machine to a remote machine over a secure SSH connection.
rsync allows you to syncronise remote folders.
They are different programs and both have their uses. scp is always secure, whereas rsync must travel over SSH to be secure.
6
Also, pretty sure rsync has to be installed on the other end.
â ckhan
May 31 '12 at 7:59
3
@ckhan, no it can copy without having anything installed in the other side, it'll just be less efficient.
â mikebloch
May 31 '12 at 8:40
2
I like scp's simplicity.
â Alex Chamberlain
May 31 '12 at 9:29
2
@mikebloch How do you do that? Is it a new feature? Just tried this using version 3.0.9. and it complained it couldn't findrsync
on the remote.
â Alexios
May 31 '12 at 10:00
1
@mikebloch, it has to be installed on the server to do the checksum computations, which can add a lot of cpu load to the server. This is why most large sites don't support it, and whyzsync
was created as an alternative.
â psusi
May 31 '12 at 22:17
 |Â
show 3 more comments
up vote
15
down vote
One of the main things (which I think no one mentioned) is that if you are transferring large amounts of data or files, and if the transfer is disconnected before completion for any reason, rsync will pick it up where it left off. Whereas scp doesn't.
I use scp if I want to transfer one or couple of files or directories. I go to rsync for multi GB size data.
2
Might be worth adding that the--partial
flag is useful when transferring large files.rsync
will pick up where it left off within the file rather than starting that file again.
â Flup
Jul 26 '13 at 15:28
As @Flup mentioned rsync won't leave anyt file-in-transit around for you to resume unless you use the --partial option. These files are by default hidden in the target directory. You can use --partial-dir to put all of these files in a single directory.
â Lester Cheung
Mar 1 '16 at 10:56
Well,rsync -vP username@host:/path/to/file .
will do this too. See this answer on Stackoverflow
â Devesh Saini
Aug 12 '16 at 18:20
add a comment |Â
up vote
5
down vote
rsync: Transfers deltas(using its Delta Transfer Algorithm) between:
local and remote hosts
scp: Transfers whole files between:
local and remote hosts
remote and remote hosts
Summary: scp
can transfer files between two remote hosts while rsync
doesn't support it.
rsync can transfer files between two remote hosts. In fact,rsync a host:b
is equivalent toscp a host:b
.
â brandizzi
Feb 19 '17 at 13:34
That's what I wrote, rsync can transfer deltas between local and remote hosts but scp is not limited to just that, it can transfer deltas between two remote hosts. @brandizzi
â Devesh Saini
Feb 19 '17 at 14:08
add a comment |Â
up vote
2
down vote
User Chris at Webhosting Talk writes:
rsync
compares the files at each end and transfers only the changed
parts of changed files. When you transfer files the first timeo it
behaves pretty much likescp
, but for a second transfer, where most
files are unchanged, it will push a lot less data thanscp
. It's also
a convenient way to restart failed transfers - you just reissue the
same command and it will pick up where it left off the time before,
whereasscp
will start again from scratch.
add a comment |Â
up vote
0
down vote
scp
is simpler to use as it takes less arguments. I catch myselv using scp instead of rsync
if I only transfer a single file. Propably I am just to lazy to define an alias to rsync... ;-)
1
Hmmm, why is it so?rsync a host:b
is equivalent toscp a host:b
, same number of arguments.
â mikebloch
Apr 9 '13 at 5:40
1
@mikebloch Two letters more to type... ;-) In the past I had to supply "-e ssh -a" to get the proper result. Now that "-e ssh" is default this might be a different game.
â Nils
Apr 9 '13 at 14:44
add a comment |Â
up vote
0
down vote
Credits to @tomrunia at https://gist.github.com/KartikTalwar/4393116
rsync -aHAXxv --numeric-ids --delete --progress
-e "ssh -T -c aes128-gcm@openssh.com -o Compression=no -x"
[source_directory] user@hostname:[target_directory]/
Pay attention to --delete
, don't use it if you want to keep extraneous files in dest dirs
add a comment |Â
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
24
down vote
accepted
If you have to copy a large number of files, or have large files, rsync over ssh will be much faster than scp.
21
rsync
speeds up copies when the destination already has an older copy of the file(s) by sending only the changed parts, otherwise it is not faster thanscp
.
â psusi
May 31 '12 at 22:19
5
You can try it out yourself, or take someone elses word for it: digitalsanctuary.com/tech-blog/debian/⦠. Try scp vs rsync of your /usr/bin/ dir for example.
â Not Now
May 31 '12 at 22:43
1
It looks likescp
does have a problem with large numbers of small files. With a single large file though, both can easily saturate a 100 mbps lan.
â psusi
Jun 1 '12 at 14:32
1
Interesting.rsync
should have more overhead, since it needs to check in advance if the target(s) exists.
â Nils
Jun 10 '12 at 20:56
26
I don't see how this answers the question
â ericn
May 15 '15 at 2:11
 |Â
show 3 more comments
up vote
24
down vote
accepted
If you have to copy a large number of files, or have large files, rsync over ssh will be much faster than scp.
21
rsync
speeds up copies when the destination already has an older copy of the file(s) by sending only the changed parts, otherwise it is not faster thanscp
.
â psusi
May 31 '12 at 22:19
5
You can try it out yourself, or take someone elses word for it: digitalsanctuary.com/tech-blog/debian/⦠. Try scp vs rsync of your /usr/bin/ dir for example.
â Not Now
May 31 '12 at 22:43
1
It looks likescp
does have a problem with large numbers of small files. With a single large file though, both can easily saturate a 100 mbps lan.
â psusi
Jun 1 '12 at 14:32
1
Interesting.rsync
should have more overhead, since it needs to check in advance if the target(s) exists.
â Nils
Jun 10 '12 at 20:56
26
I don't see how this answers the question
â ericn
May 15 '15 at 2:11
 |Â
show 3 more comments
up vote
24
down vote
accepted
up vote
24
down vote
accepted
If you have to copy a large number of files, or have large files, rsync over ssh will be much faster than scp.
If you have to copy a large number of files, or have large files, rsync over ssh will be much faster than scp.
answered May 31 '12 at 22:05
Not Now
1,84911216
1,84911216
21
rsync
speeds up copies when the destination already has an older copy of the file(s) by sending only the changed parts, otherwise it is not faster thanscp
.
â psusi
May 31 '12 at 22:19
5
You can try it out yourself, or take someone elses word for it: digitalsanctuary.com/tech-blog/debian/⦠. Try scp vs rsync of your /usr/bin/ dir for example.
â Not Now
May 31 '12 at 22:43
1
It looks likescp
does have a problem with large numbers of small files. With a single large file though, both can easily saturate a 100 mbps lan.
â psusi
Jun 1 '12 at 14:32
1
Interesting.rsync
should have more overhead, since it needs to check in advance if the target(s) exists.
â Nils
Jun 10 '12 at 20:56
26
I don't see how this answers the question
â ericn
May 15 '15 at 2:11
 |Â
show 3 more comments
21
rsync
speeds up copies when the destination already has an older copy of the file(s) by sending only the changed parts, otherwise it is not faster thanscp
.
â psusi
May 31 '12 at 22:19
5
You can try it out yourself, or take someone elses word for it: digitalsanctuary.com/tech-blog/debian/⦠. Try scp vs rsync of your /usr/bin/ dir for example.
â Not Now
May 31 '12 at 22:43
1
It looks likescp
does have a problem with large numbers of small files. With a single large file though, both can easily saturate a 100 mbps lan.
â psusi
Jun 1 '12 at 14:32
1
Interesting.rsync
should have more overhead, since it needs to check in advance if the target(s) exists.
â Nils
Jun 10 '12 at 20:56
26
I don't see how this answers the question
â ericn
May 15 '15 at 2:11
21
21
rsync
speeds up copies when the destination already has an older copy of the file(s) by sending only the changed parts, otherwise it is not faster than scp
.â psusi
May 31 '12 at 22:19
rsync
speeds up copies when the destination already has an older copy of the file(s) by sending only the changed parts, otherwise it is not faster than scp
.â psusi
May 31 '12 at 22:19
5
5
You can try it out yourself, or take someone elses word for it: digitalsanctuary.com/tech-blog/debian/⦠. Try scp vs rsync of your /usr/bin/ dir for example.
â Not Now
May 31 '12 at 22:43
You can try it out yourself, or take someone elses word for it: digitalsanctuary.com/tech-blog/debian/⦠. Try scp vs rsync of your /usr/bin/ dir for example.
â Not Now
May 31 '12 at 22:43
1
1
It looks like
scp
does have a problem with large numbers of small files. With a single large file though, both can easily saturate a 100 mbps lan.â psusi
Jun 1 '12 at 14:32
It looks like
scp
does have a problem with large numbers of small files. With a single large file though, both can easily saturate a 100 mbps lan.â psusi
Jun 1 '12 at 14:32
1
1
Interesting.
rsync
should have more overhead, since it needs to check in advance if the target(s) exists.â Nils
Jun 10 '12 at 20:56
Interesting.
rsync
should have more overhead, since it needs to check in advance if the target(s) exists.â Nils
Jun 10 '12 at 20:56
26
26
I don't see how this answers the question
â ericn
May 15 '15 at 2:11
I don't see how this answers the question
â ericn
May 15 '15 at 2:11
 |Â
show 3 more comments
up vote
40
down vote
scp provides a cp like method to copy files from one machine to a remote machine over a secure SSH connection.
rsync allows you to syncronise remote folders.
They are different programs and both have their uses. scp is always secure, whereas rsync must travel over SSH to be secure.
6
Also, pretty sure rsync has to be installed on the other end.
â ckhan
May 31 '12 at 7:59
3
@ckhan, no it can copy without having anything installed in the other side, it'll just be less efficient.
â mikebloch
May 31 '12 at 8:40
2
I like scp's simplicity.
â Alex Chamberlain
May 31 '12 at 9:29
2
@mikebloch How do you do that? Is it a new feature? Just tried this using version 3.0.9. and it complained it couldn't findrsync
on the remote.
â Alexios
May 31 '12 at 10:00
1
@mikebloch, it has to be installed on the server to do the checksum computations, which can add a lot of cpu load to the server. This is why most large sites don't support it, and whyzsync
was created as an alternative.
â psusi
May 31 '12 at 22:17
 |Â
show 3 more comments
up vote
40
down vote
scp provides a cp like method to copy files from one machine to a remote machine over a secure SSH connection.
rsync allows you to syncronise remote folders.
They are different programs and both have their uses. scp is always secure, whereas rsync must travel over SSH to be secure.
6
Also, pretty sure rsync has to be installed on the other end.
â ckhan
May 31 '12 at 7:59
3
@ckhan, no it can copy without having anything installed in the other side, it'll just be less efficient.
â mikebloch
May 31 '12 at 8:40
2
I like scp's simplicity.
â Alex Chamberlain
May 31 '12 at 9:29
2
@mikebloch How do you do that? Is it a new feature? Just tried this using version 3.0.9. and it complained it couldn't findrsync
on the remote.
â Alexios
May 31 '12 at 10:00
1
@mikebloch, it has to be installed on the server to do the checksum computations, which can add a lot of cpu load to the server. This is why most large sites don't support it, and whyzsync
was created as an alternative.
â psusi
May 31 '12 at 22:17
 |Â
show 3 more comments
up vote
40
down vote
up vote
40
down vote
scp provides a cp like method to copy files from one machine to a remote machine over a secure SSH connection.
rsync allows you to syncronise remote folders.
They are different programs and both have their uses. scp is always secure, whereas rsync must travel over SSH to be secure.
scp provides a cp like method to copy files from one machine to a remote machine over a secure SSH connection.
rsync allows you to syncronise remote folders.
They are different programs and both have their uses. scp is always secure, whereas rsync must travel over SSH to be secure.
answered May 31 '12 at 7:25
Alex Chamberlain
1,40221323
1,40221323
6
Also, pretty sure rsync has to be installed on the other end.
â ckhan
May 31 '12 at 7:59
3
@ckhan, no it can copy without having anything installed in the other side, it'll just be less efficient.
â mikebloch
May 31 '12 at 8:40
2
I like scp's simplicity.
â Alex Chamberlain
May 31 '12 at 9:29
2
@mikebloch How do you do that? Is it a new feature? Just tried this using version 3.0.9. and it complained it couldn't findrsync
on the remote.
â Alexios
May 31 '12 at 10:00
1
@mikebloch, it has to be installed on the server to do the checksum computations, which can add a lot of cpu load to the server. This is why most large sites don't support it, and whyzsync
was created as an alternative.
â psusi
May 31 '12 at 22:17
 |Â
show 3 more comments
6
Also, pretty sure rsync has to be installed on the other end.
â ckhan
May 31 '12 at 7:59
3
@ckhan, no it can copy without having anything installed in the other side, it'll just be less efficient.
â mikebloch
May 31 '12 at 8:40
2
I like scp's simplicity.
â Alex Chamberlain
May 31 '12 at 9:29
2
@mikebloch How do you do that? Is it a new feature? Just tried this using version 3.0.9. and it complained it couldn't findrsync
on the remote.
â Alexios
May 31 '12 at 10:00
1
@mikebloch, it has to be installed on the server to do the checksum computations, which can add a lot of cpu load to the server. This is why most large sites don't support it, and whyzsync
was created as an alternative.
â psusi
May 31 '12 at 22:17
6
6
Also, pretty sure rsync has to be installed on the other end.
â ckhan
May 31 '12 at 7:59
Also, pretty sure rsync has to be installed on the other end.
â ckhan
May 31 '12 at 7:59
3
3
@ckhan, no it can copy without having anything installed in the other side, it'll just be less efficient.
â mikebloch
May 31 '12 at 8:40
@ckhan, no it can copy without having anything installed in the other side, it'll just be less efficient.
â mikebloch
May 31 '12 at 8:40
2
2
I like scp's simplicity.
â Alex Chamberlain
May 31 '12 at 9:29
I like scp's simplicity.
â Alex Chamberlain
May 31 '12 at 9:29
2
2
@mikebloch How do you do that? Is it a new feature? Just tried this using version 3.0.9. and it complained it couldn't find
rsync
on the remote.â Alexios
May 31 '12 at 10:00
@mikebloch How do you do that? Is it a new feature? Just tried this using version 3.0.9. and it complained it couldn't find
rsync
on the remote.â Alexios
May 31 '12 at 10:00
1
1
@mikebloch, it has to be installed on the server to do the checksum computations, which can add a lot of cpu load to the server. This is why most large sites don't support it, and why
zsync
was created as an alternative.â psusi
May 31 '12 at 22:17
@mikebloch, it has to be installed on the server to do the checksum computations, which can add a lot of cpu load to the server. This is why most large sites don't support it, and why
zsync
was created as an alternative.â psusi
May 31 '12 at 22:17
 |Â
show 3 more comments
up vote
15
down vote
One of the main things (which I think no one mentioned) is that if you are transferring large amounts of data or files, and if the transfer is disconnected before completion for any reason, rsync will pick it up where it left off. Whereas scp doesn't.
I use scp if I want to transfer one or couple of files or directories. I go to rsync for multi GB size data.
2
Might be worth adding that the--partial
flag is useful when transferring large files.rsync
will pick up where it left off within the file rather than starting that file again.
â Flup
Jul 26 '13 at 15:28
As @Flup mentioned rsync won't leave anyt file-in-transit around for you to resume unless you use the --partial option. These files are by default hidden in the target directory. You can use --partial-dir to put all of these files in a single directory.
â Lester Cheung
Mar 1 '16 at 10:56
Well,rsync -vP username@host:/path/to/file .
will do this too. See this answer on Stackoverflow
â Devesh Saini
Aug 12 '16 at 18:20
add a comment |Â
up vote
15
down vote
One of the main things (which I think no one mentioned) is that if you are transferring large amounts of data or files, and if the transfer is disconnected before completion for any reason, rsync will pick it up where it left off. Whereas scp doesn't.
I use scp if I want to transfer one or couple of files or directories. I go to rsync for multi GB size data.
2
Might be worth adding that the--partial
flag is useful when transferring large files.rsync
will pick up where it left off within the file rather than starting that file again.
â Flup
Jul 26 '13 at 15:28
As @Flup mentioned rsync won't leave anyt file-in-transit around for you to resume unless you use the --partial option. These files are by default hidden in the target directory. You can use --partial-dir to put all of these files in a single directory.
â Lester Cheung
Mar 1 '16 at 10:56
Well,rsync -vP username@host:/path/to/file .
will do this too. See this answer on Stackoverflow
â Devesh Saini
Aug 12 '16 at 18:20
add a comment |Â
up vote
15
down vote
up vote
15
down vote
One of the main things (which I think no one mentioned) is that if you are transferring large amounts of data or files, and if the transfer is disconnected before completion for any reason, rsync will pick it up where it left off. Whereas scp doesn't.
I use scp if I want to transfer one or couple of files or directories. I go to rsync for multi GB size data.
One of the main things (which I think no one mentioned) is that if you are transferring large amounts of data or files, and if the transfer is disconnected before completion for any reason, rsync will pick it up where it left off. Whereas scp doesn't.
I use scp if I want to transfer one or couple of files or directories. I go to rsync for multi GB size data.
answered Jul 26 '13 at 14:49
ravi
15112
15112
2
Might be worth adding that the--partial
flag is useful when transferring large files.rsync
will pick up where it left off within the file rather than starting that file again.
â Flup
Jul 26 '13 at 15:28
As @Flup mentioned rsync won't leave anyt file-in-transit around for you to resume unless you use the --partial option. These files are by default hidden in the target directory. You can use --partial-dir to put all of these files in a single directory.
â Lester Cheung
Mar 1 '16 at 10:56
Well,rsync -vP username@host:/path/to/file .
will do this too. See this answer on Stackoverflow
â Devesh Saini
Aug 12 '16 at 18:20
add a comment |Â
2
Might be worth adding that the--partial
flag is useful when transferring large files.rsync
will pick up where it left off within the file rather than starting that file again.
â Flup
Jul 26 '13 at 15:28
As @Flup mentioned rsync won't leave anyt file-in-transit around for you to resume unless you use the --partial option. These files are by default hidden in the target directory. You can use --partial-dir to put all of these files in a single directory.
â Lester Cheung
Mar 1 '16 at 10:56
Well,rsync -vP username@host:/path/to/file .
will do this too. See this answer on Stackoverflow
â Devesh Saini
Aug 12 '16 at 18:20
2
2
Might be worth adding that the
--partial
flag is useful when transferring large files. rsync
will pick up where it left off within the file rather than starting that file again.â Flup
Jul 26 '13 at 15:28
Might be worth adding that the
--partial
flag is useful when transferring large files. rsync
will pick up where it left off within the file rather than starting that file again.â Flup
Jul 26 '13 at 15:28
As @Flup mentioned rsync won't leave anyt file-in-transit around for you to resume unless you use the --partial option. These files are by default hidden in the target directory. You can use --partial-dir to put all of these files in a single directory.
â Lester Cheung
Mar 1 '16 at 10:56
As @Flup mentioned rsync won't leave anyt file-in-transit around for you to resume unless you use the --partial option. These files are by default hidden in the target directory. You can use --partial-dir to put all of these files in a single directory.
â Lester Cheung
Mar 1 '16 at 10:56
Well,
rsync -vP username@host:/path/to/file .
will do this too. See this answer on Stackoverflowâ Devesh Saini
Aug 12 '16 at 18:20
Well,
rsync -vP username@host:/path/to/file .
will do this too. See this answer on Stackoverflowâ Devesh Saini
Aug 12 '16 at 18:20
add a comment |Â
up vote
5
down vote
rsync: Transfers deltas(using its Delta Transfer Algorithm) between:
local and remote hosts
scp: Transfers whole files between:
local and remote hosts
remote and remote hosts
Summary: scp
can transfer files between two remote hosts while rsync
doesn't support it.
rsync can transfer files between two remote hosts. In fact,rsync a host:b
is equivalent toscp a host:b
.
â brandizzi
Feb 19 '17 at 13:34
That's what I wrote, rsync can transfer deltas between local and remote hosts but scp is not limited to just that, it can transfer deltas between two remote hosts. @brandizzi
â Devesh Saini
Feb 19 '17 at 14:08
add a comment |Â
up vote
5
down vote
rsync: Transfers deltas(using its Delta Transfer Algorithm) between:
local and remote hosts
scp: Transfers whole files between:
local and remote hosts
remote and remote hosts
Summary: scp
can transfer files between two remote hosts while rsync
doesn't support it.
rsync can transfer files between two remote hosts. In fact,rsync a host:b
is equivalent toscp a host:b
.
â brandizzi
Feb 19 '17 at 13:34
That's what I wrote, rsync can transfer deltas between local and remote hosts but scp is not limited to just that, it can transfer deltas between two remote hosts. @brandizzi
â Devesh Saini
Feb 19 '17 at 14:08
add a comment |Â
up vote
5
down vote
up vote
5
down vote
rsync: Transfers deltas(using its Delta Transfer Algorithm) between:
local and remote hosts
scp: Transfers whole files between:
local and remote hosts
remote and remote hosts
Summary: scp
can transfer files between two remote hosts while rsync
doesn't support it.
rsync: Transfers deltas(using its Delta Transfer Algorithm) between:
local and remote hosts
scp: Transfers whole files between:
local and remote hosts
remote and remote hosts
Summary: scp
can transfer files between two remote hosts while rsync
doesn't support it.
edited Aug 13 '16 at 14:03
answered Aug 12 '16 at 18:39
Devesh Saini
15913
15913
rsync can transfer files between two remote hosts. In fact,rsync a host:b
is equivalent toscp a host:b
.
â brandizzi
Feb 19 '17 at 13:34
That's what I wrote, rsync can transfer deltas between local and remote hosts but scp is not limited to just that, it can transfer deltas between two remote hosts. @brandizzi
â Devesh Saini
Feb 19 '17 at 14:08
add a comment |Â
rsync can transfer files between two remote hosts. In fact,rsync a host:b
is equivalent toscp a host:b
.
â brandizzi
Feb 19 '17 at 13:34
That's what I wrote, rsync can transfer deltas between local and remote hosts but scp is not limited to just that, it can transfer deltas between two remote hosts. @brandizzi
â Devesh Saini
Feb 19 '17 at 14:08
rsync can transfer files between two remote hosts. In fact,
rsync a host:b
is equivalent to scp a host:b
.â brandizzi
Feb 19 '17 at 13:34
rsync can transfer files between two remote hosts. In fact,
rsync a host:b
is equivalent to scp a host:b
.â brandizzi
Feb 19 '17 at 13:34
That's what I wrote, rsync can transfer deltas between local and remote hosts but scp is not limited to just that, it can transfer deltas between two remote hosts. @brandizzi
â Devesh Saini
Feb 19 '17 at 14:08
That's what I wrote, rsync can transfer deltas between local and remote hosts but scp is not limited to just that, it can transfer deltas between two remote hosts. @brandizzi
â Devesh Saini
Feb 19 '17 at 14:08
add a comment |Â
up vote
2
down vote
User Chris at Webhosting Talk writes:
rsync
compares the files at each end and transfers only the changed
parts of changed files. When you transfer files the first timeo it
behaves pretty much likescp
, but for a second transfer, where most
files are unchanged, it will push a lot less data thanscp
. It's also
a convenient way to restart failed transfers - you just reissue the
same command and it will pick up where it left off the time before,
whereasscp
will start again from scratch.
add a comment |Â
up vote
2
down vote
User Chris at Webhosting Talk writes:
rsync
compares the files at each end and transfers only the changed
parts of changed files. When you transfer files the first timeo it
behaves pretty much likescp
, but for a second transfer, where most
files are unchanged, it will push a lot less data thanscp
. It's also
a convenient way to restart failed transfers - you just reissue the
same command and it will pick up where it left off the time before,
whereasscp
will start again from scratch.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
User Chris at Webhosting Talk writes:
rsync
compares the files at each end and transfers only the changed
parts of changed files. When you transfer files the first timeo it
behaves pretty much likescp
, but for a second transfer, where most
files are unchanged, it will push a lot less data thanscp
. It's also
a convenient way to restart failed transfers - you just reissue the
same command and it will pick up where it left off the time before,
whereasscp
will start again from scratch.
User Chris at Webhosting Talk writes:
rsync
compares the files at each end and transfers only the changed
parts of changed files. When you transfer files the first timeo it
behaves pretty much likescp
, but for a second transfer, where most
files are unchanged, it will push a lot less data thanscp
. It's also
a convenient way to restart failed transfers - you just reissue the
same command and it will pick up where it left off the time before,
whereasscp
will start again from scratch.
edited Jul 5 '16 at 10:18
Toby Speight
5,19311031
5,19311031
answered Jul 5 '16 at 9:50
nkint
21019
21019
add a comment |Â
add a comment |Â
up vote
0
down vote
scp
is simpler to use as it takes less arguments. I catch myselv using scp instead of rsync
if I only transfer a single file. Propably I am just to lazy to define an alias to rsync... ;-)
1
Hmmm, why is it so?rsync a host:b
is equivalent toscp a host:b
, same number of arguments.
â mikebloch
Apr 9 '13 at 5:40
1
@mikebloch Two letters more to type... ;-) In the past I had to supply "-e ssh -a" to get the proper result. Now that "-e ssh" is default this might be a different game.
â Nils
Apr 9 '13 at 14:44
add a comment |Â
up vote
0
down vote
scp
is simpler to use as it takes less arguments. I catch myselv using scp instead of rsync
if I only transfer a single file. Propably I am just to lazy to define an alias to rsync... ;-)
1
Hmmm, why is it so?rsync a host:b
is equivalent toscp a host:b
, same number of arguments.
â mikebloch
Apr 9 '13 at 5:40
1
@mikebloch Two letters more to type... ;-) In the past I had to supply "-e ssh -a" to get the proper result. Now that "-e ssh" is default this might be a different game.
â Nils
Apr 9 '13 at 14:44
add a comment |Â
up vote
0
down vote
up vote
0
down vote
scp
is simpler to use as it takes less arguments. I catch myselv using scp instead of rsync
if I only transfer a single file. Propably I am just to lazy to define an alias to rsync... ;-)
scp
is simpler to use as it takes less arguments. I catch myselv using scp instead of rsync
if I only transfer a single file. Propably I am just to lazy to define an alias to rsync... ;-)
answered Jun 10 '12 at 21:02
Nils
12.3k63669
12.3k63669
1
Hmmm, why is it so?rsync a host:b
is equivalent toscp a host:b
, same number of arguments.
â mikebloch
Apr 9 '13 at 5:40
1
@mikebloch Two letters more to type... ;-) In the past I had to supply "-e ssh -a" to get the proper result. Now that "-e ssh" is default this might be a different game.
â Nils
Apr 9 '13 at 14:44
add a comment |Â
1
Hmmm, why is it so?rsync a host:b
is equivalent toscp a host:b
, same number of arguments.
â mikebloch
Apr 9 '13 at 5:40
1
@mikebloch Two letters more to type... ;-) In the past I had to supply "-e ssh -a" to get the proper result. Now that "-e ssh" is default this might be a different game.
â Nils
Apr 9 '13 at 14:44
1
1
Hmmm, why is it so?
rsync a host:b
is equivalent to scp a host:b
, same number of arguments.â mikebloch
Apr 9 '13 at 5:40
Hmmm, why is it so?
rsync a host:b
is equivalent to scp a host:b
, same number of arguments.â mikebloch
Apr 9 '13 at 5:40
1
1
@mikebloch Two letters more to type... ;-) In the past I had to supply "-e ssh -a" to get the proper result. Now that "-e ssh" is default this might be a different game.
â Nils
Apr 9 '13 at 14:44
@mikebloch Two letters more to type... ;-) In the past I had to supply "-e ssh -a" to get the proper result. Now that "-e ssh" is default this might be a different game.
â Nils
Apr 9 '13 at 14:44
add a comment |Â
up vote
0
down vote
Credits to @tomrunia at https://gist.github.com/KartikTalwar/4393116
rsync -aHAXxv --numeric-ids --delete --progress
-e "ssh -T -c aes128-gcm@openssh.com -o Compression=no -x"
[source_directory] user@hostname:[target_directory]/
Pay attention to --delete
, don't use it if you want to keep extraneous files in dest dirs
add a comment |Â
up vote
0
down vote
Credits to @tomrunia at https://gist.github.com/KartikTalwar/4393116
rsync -aHAXxv --numeric-ids --delete --progress
-e "ssh -T -c aes128-gcm@openssh.com -o Compression=no -x"
[source_directory] user@hostname:[target_directory]/
Pay attention to --delete
, don't use it if you want to keep extraneous files in dest dirs
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Credits to @tomrunia at https://gist.github.com/KartikTalwar/4393116
rsync -aHAXxv --numeric-ids --delete --progress
-e "ssh -T -c aes128-gcm@openssh.com -o Compression=no -x"
[source_directory] user@hostname:[target_directory]/
Pay attention to --delete
, don't use it if you want to keep extraneous files in dest dirs
Credits to @tomrunia at https://gist.github.com/KartikTalwar/4393116
rsync -aHAXxv --numeric-ids --delete --progress
-e "ssh -T -c aes128-gcm@openssh.com -o Compression=no -x"
[source_directory] user@hostname:[target_directory]/
Pay attention to --delete
, don't use it if you want to keep extraneous files in dest dirs
edited 12 mins ago
Communityâ¦
1
1
answered Feb 21 at 9:35
Jorj
1011
1011
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f39718%2fis-there-ever-a-reason-to-use-scp-instead-of-rsync%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
6
Short answer: No. scp is never harmful.
â Shadur
May 31 '12 at 9:01
1
@Shadur scp is harmful in that it overwrites existing target files by default. So's rsync, but it at least allows limiting the possible damage with
-u
.â Gilles
May 31 '12 at 22:46
3
@Gilles As with any tool, you must understand what it does and how it does it to use it safely.
â Alex Chamberlain
Jun 1 '12 at 7:24
6
In that context, regular
cp
andrm
would be considered "harmful" -- and if you define "harmful" as "can screw me over if I do something stupid",rsync
isn't any less harmful.â Shadur
Jun 1 '12 at 9:31
1
On systems without
rsync
installed, usingrsync
is (obviously) not even possible.â Kusalananda
Feb 21 at 10:23