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
32
votes
1 answer

Comprehensive list of rsync error codes

I'm writing a script that does daily snapshots of users' home directories. First I do a dry run using: rsync -azvrn --out-format="%M %f" source/dir dest/dir and then the actual rsync operation (by removing the -n option). I'm trying to parse the…
seebiscuit
  • 4,905
  • 5
  • 31
  • 47
31
votes
2 answers

Do not show directories in rsync output

Does anybody know if there is an rsync option, so that directories that are being traversed do not show on stdout. I'm syncing music libraries, and the massive amount of directories make it very hard to see which file changes are actually…
Koen Weyn
  • 989
  • 1
  • 7
  • 12
31
votes
7 answers

rsync --delete --files-from=list / dest/ does not delete unwanted files

As you can see in the title I try to sync a folder with a list of files. I hoped that this command would delete all files in dest/ that are not on the list, but it didn't. So I searched a little bit and know now, that rsync can't do this. But I need…
dAnjou
  • 3,823
  • 7
  • 27
  • 34
30
votes
1 answer

rsync deploy and file/directories permissions

I'm trying to use rsync to deploy my website that resides on a shared web host. Phpsuexec is running on it and that caused me problems with permissions on files and directories I've transfered via rsync. Actually files should be set to 644 and…
Granze
  • 497
  • 1
  • 4
  • 10
30
votes
2 answers

Rsync checksum only for same size files

There's a bunch of threads regarding rsync checksum, but none seems addressing this need, which would be the most effective and fastest way to sync, at least in my case: same time and same size ► skip file (no transfer, no checksum) different sizes…
Sylvain
  • 631
  • 1
  • 6
  • 6
30
votes
4 answers

rsync --include option does not exclude other files

trying to rsync files of certain extension(*.sh), but the bash script below still transfer all the files, why? from=/home/xxx rsync -zvr --include="*.sh" $from/* root@$host:/home/tmp/
user121196
  • 30,032
  • 57
  • 148
  • 198
28
votes
1 answer

StrictHostKeyChecking not Ignoring Fingerprint Validation

I'm Rsync-ing with the following command: # rsync -arvce ssh /tmp/rsync/file.txt user@domain:/tmp/rsync/ This works fine, and I will have to do this for multiple places, so I want to implement the StrictHostKeyChecking option. After reading other…
coffeemonitor
  • 12,780
  • 34
  • 99
  • 149
28
votes
6 answers

rsync .git directory

This question probably is based on my lack of understanding of the role of .gits and git repositories in general but: Can I rsync a dir with content that I created with git init between machines ? I have a repository on my laptop, and the only way…
svrist
  • 7,042
  • 7
  • 44
  • 67
26
votes
1 answer

mv equivalent rsync command

i'm trying to move folders to another folders using command line, with overwrite if already exists, but i got error "Is a directory" when using mv.. example: mv src/test/ dest/ there are many files and folders on src/test/, there are also some…
Kokizzu
  • 24,974
  • 37
  • 137
  • 233
26
votes
5 answers

What is the fastest way to transfer files over a network (FTP, HTTP, RSync, etc.)

I'm trying to figure out the best way to transfer large amounts of data over a network between two systems. I am currently looking into either FTP, HTTP, or RSync, and I am wondering which one is the fastest. I've looked online for some answers…
oneself
  • 38,641
  • 34
  • 96
  • 120
25
votes
1 answer

How to rsync files with matching pattern in path by keeping directory structure intact?

I want to copy all files from server A to server B that have the same parent directory-name in different levels of filesystem hierarchy,…
murks
  • 299
  • 1
  • 3
  • 8
25
votes
11 answers

error in rsync protocol data stream (code 12) at io.c(605) [Receiver=3.0.9]

I'm trying to rsync data from one ubuntu box to another, but whenever I try to run the command, I get the error, error in rsync protocol data stream (code 12) at io.c(605) [Receiver=3.0.9] I've seen people get io.c(600) and 610 errors in various…
Jules
  • 14,200
  • 13
  • 56
  • 101
25
votes
2 answers

Bypass Rsync Prompt "Are you sure you want to continue connecting"

How do you bypass this question or add a flag that auto answers this? Because I am trying to write a script, and this question keeps stopping the process of rsync since there is no way to answer this in the script when prompted.
user1480718
  • 311
  • 1
  • 4
  • 5
24
votes
5 answers

Rsync cronjob that will only run if rsync isn't already running

I have checked for a solution here but cannot seem to find one. I am dealing with a very slow wan connection about 300kb/sec. For my downloads I am using a remote box, and then I am downloading them to my house. I am trying to run a cronjob that…
mfpockets
  • 243
  • 1
  • 2
  • 4
23
votes
4 answers

Resuming rsync partial (-P/--partial) on an interrupted transfer

I am trying to backup my file server to a remove file server using rsync. Rsync is not successfully resuming when a transfer is interrupted. I used the partial option but rsync doesn't find the file it already started because it renames it to a…
Glitches
  • 742
  • 2
  • 8
  • 18