Questions tagged [rsync]

GENERAL RSYNC SUPPORT IS OFF-TOPIC. Support questions may be asked on https://superuser.com. rsync can copy files locally, over ssh or rsh remote shell services, or with a remote rsync daemon. Files can be incrementally updated and rsync provides for file-size and last-modified time update checks. rsync runs on POSIX systems including Linux, BSD, Unix, and Windows (via Cygwin).

Rsync is a file copy utility which runs on POSIX systems, including Linux, BSD, Unix, and Windows (via Cygwin).

rsync is capable of copying files locally and remotely, using ssh or rsh services as transport, or to a remote rsync daemon (non-secure way). rsync uses a delta-transfer algorithm for transferring files. Files can be incrementally updated based on source/destination differences in file-size and/or timestamps, or differences in checksums.

rsync is very suitable for low-bandwidth and high-latency networks as it transfers only the changed part of files.

rsync was developed by Andrew Tridgell and currently is maintained by Wayne Davison.

For more details see http://rsync.samba.org/

2462 questions
70
votes
1 answer

rsync delete files on sending side after transfer

I want to download a large amount of data from a remote machine. I'd like the data to be erased on the remote machine everytime a file finishes downloading. How do I do that? Is there a flag for rsync to do this?
eran
  • 14,496
  • 34
  • 98
  • 144
70
votes
8 answers

rsync - create all missing parent directories?

I'm looking for an rsync-like program which will create any missing parent directories on the remote side. For example, if I have /top/a/b/c/d on one server and only /top/a exists on the remote server, I want to copy d to the remote server and have…
ErikR
  • 51,541
  • 9
  • 73
  • 124
68
votes
7 answers

Recursive copy of a specific file type maintaining the file structure in Unix/Linux?

I need to copy all *.jar files from a directory maintaining the folder structure of the parent directories. How can I do it in UNIX/Linux terminal? The command cp -r *.jar /destination_dir is not what I am looking for.
Yury Pogrebnyak
  • 4,093
  • 9
  • 45
  • 78
55
votes
6 answers

Why is this rsync connection unexpectedly closed on Windows?

I'm trying to use rsync on Windows 7. I installed cwRsync and tried to connect to Ubuntu 9.04. $ rsync -azC --force --more-options ./ user@server:/my/path/ rsync: connection unexpectedly closed (0 bytes received so far) [receiver] rsync error:…
rkmax
  • 17,633
  • 23
  • 91
  • 176
51
votes
6 answers

Rsync on Windows: wrong permissions for created directories

I'm trying to push changes to my server through ssh on windows (cygwin) using rsync. The command I am using is: rsync -rvz -e ssh /cygdrive/c/myfolder/ rsyncuser@192.168.1.110:/srv/www/prj112/myfolder/ /srv/www/prj112/myfolder/ is owned by…
user391986
  • 29,536
  • 39
  • 126
  • 205
49
votes
3 answers

rsync through ssh tunnel

I want to rsync to a cluster node to which I usually connect passing through another system: Say I connect first to ssh user@bridge and from there to ssh user@clusternode Now I want to rsync from my workstation to clusternode. I do the…
simona
  • 2,009
  • 6
  • 29
  • 41
48
votes
5 answers

rsync output: what do the characters on the left mean?

I do not understand the output I am getting from rsync. Can someone help me out? The output contains lines such as:
ForYourOwnGood
  • 38,822
  • 5
  • 30
  • 27
47
votes
2 answers

Prevent rsync from deleting destination files that match a given pattern

I'm using rsync to sync files from a source to a destination: rsync -av --delete source destination I have a single directory on the destination side which is not on the source side. I'd like to prevent rsync from deleting this directory. Is there…
turtle
  • 7,533
  • 18
  • 68
  • 97
47
votes
4 answers

How to use Rsync to copy only specific subdirectories (same names in several directories)

I have such directories structure on server 1: data company1 unique_folder1 other_folder ... company2 unique_folder1 ... ... And I want duplicate this folder structure on server 2, but copy only directories/subdirectories of unique_folder1.…
Andron
  • 6,413
  • 4
  • 43
  • 56
46
votes
5 answers

How to copy a directory from local machine to remote machine

I am using ssh to connect to a remote machine. Is there a way i can copy an entire directory from a local machine to the remote machine? I found this link to do it the other way round i.e copying from remote machine to local machine.
nish
  • 6,952
  • 18
  • 74
  • 128
45
votes
2 answers

rsync multiple remote directories to local machine preserving directory paths

Would I be able to use rsync as such: rsync -e ssh root@remote.com:/path/to/file:/path/to/second/file/ /local/directory/ or would i have to do something else?
FilBot3
  • 3,460
  • 6
  • 33
  • 55
44
votes
6 answers

rsync prints "skipping non-regular file" for what appears to be a regular directory

I back up my files using rsync. Right after a sync, I ran it expecting to see nothing, but instead it looked like it was skipping directories. I've (obviously) changed names, but I believe I've still captured all the information I could. What's…
Richard
  • 441
  • 1
  • 4
  • 4
44
votes
2 answers

What do the numbers in rsync's output mean?

When I run rsync with the --progress flag, I get information about the transfers as follows. path/to/file 16 100% 0.01kB/s 0:00:01 (xfer#10857, to-check=427700/441502) What do the numbers in the second row mean? I know what some of…
flybywire
  • 261,858
  • 191
  • 397
  • 503
44
votes
5 answers

How to change the owner for a rsync

I understand preserving the permissions for rsync. However in my case my local computer does not have the user the files need to under for the webserver. So when I rsync I need the owner and group to be apache on the webserver, but be my username on…
Michael Ozeryansky
  • 7,204
  • 4
  • 49
  • 61
43
votes
6 answers

Upgrading rsync on OS X using Homebrew

The rsync version on my OS X (10.10.3) is an old one, 2.6.9. I've tried to upgrade it using Homebrew but I get the following error: Error: No available formula for rsync The new one is supposed to be 3.0+ and much quicker, but how do I install…
user997225