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
43
votes
3 answers

How to automatically accept the remote key when rsyncing?

I'm attempting to make a system which automatically copies files from one server to many servers. As part of that I'm using rsync and installing SSH keys, which works correctly. My problem is that when it attempts to connect to a new server for the…
Bravo Delta
  • 842
  • 2
  • 10
  • 24
41
votes
4 answers

How to force rsync to create destination folder

Example: rsync /tmp/fol1/fol2/fol3/foln user@addr:/tmp/fol1/fol2/fol3/foln My main problem is folder /tmp/fol1 doesn't exist on remote machine. Which arguments can I use to force rsync to create this tree?
CrazySquirrel
  • 623
  • 1
  • 7
  • 9
41
votes
4 answers

How to recursively copy directories starting with "abc" on Linux/Unix?

I have a directory ~/plugins/ and inside there are many sub-directories. If I wanted to create a backup somewhere else of just the sub-directories starting with abc could I do that with a one line copy command? I would assume something like this…
cwd
  • 53,018
  • 53
  • 161
  • 198
41
votes
4 answers

Rsync how to include directories but not files?

I have a directory structure and files like this data/ data/a.txt data/folder/ data/folder/b.txt data/folder/folder/ data/folder/folder/c.txt ... a.txt, b.txt, and c.txt are large files that are computer-generated and renewed frequently. They…
chicama
  • 411
  • 1
  • 4
  • 4
41
votes
4 answers

compare contents of two directories on remote server using unix

I am new to unix and need some help here. I have two directories present on two different server. both the directories contains the same files. Now i want to check if all files are in sync in both the directories. If files are not in sync then i…
DSD
  • 591
  • 2
  • 9
  • 19
39
votes
2 answers

Rsync Encryption

I know that rsync can enable / disable the ssh encryption protocol during the file transfer. So, if the ssh encryption protocol has been disabled, does it mean that rsync does not do any encryption at all? Also, the reason why I asked the above…
bichonfrise74
  • 1,987
  • 4
  • 16
  • 11
38
votes
5 answers

Install rsync with cygwin

I would like to backup a dir in Win XP on a Solaris server via rsync. I installed cygwin but when I type rsync I get 'command not found'. How can I install rsync? And how can I install ssh. I have installed Poderosa as ssh client (a sort of putty).
rtacconi
  • 14,317
  • 20
  • 66
  • 84
38
votes
1 answer

Run Rsync from Python

I need to run an rsync command from Python. Is this possible and if so, how do I do it? rsync -Ccavz --delete DJStatic username@website
Marcus
  • 9,032
  • 11
  • 45
  • 84
36
votes
2 answers

Python Subprocess.Popen from a thread

I'm trying to launch an 'rsync' using subprocess module and Popen inside of a thread. After I call the rsync I need to read the output as well. I'm using the communicate method to read the output. The code runs fine when I do not use a thread. It…
noahd
  • 842
  • 2
  • 13
  • 25
36
votes
3 answers

read input from a file and sync accordingly

I have a text file which contains the list of files and directories that I want to copy (one on a line). Now I want rsync to take this input from my text file and sync it to the destination that I provide. I've tried playing around with…
slayedbylucifer
  • 22,878
  • 16
  • 94
  • 123
35
votes
4 answers

Errors using rspec, missing libraries after installing Homebrew and uninstalling MacPorts

I may have taken one step too far beyond my knowledge. I installed Homebrew and after it continued to give me warnings about having MacPorts installed I uninstalled that. But now my rspec tests don't run. These are the errors I…
markstewie
  • 9,237
  • 10
  • 50
  • 72
35
votes
5 answers

Bash scripting rsync: rsync: link_stat (blah) failed: No such file or directory (2)

I am trying to write a simple bash script for my local (Mac OS X) machine to move files from a directory on my machine to a remote machine. This line is failing: rsync --verbose --progress --stats --compress --rsh=ssh \ --recursive --times…
Nathaniel Ford
  • 20,545
  • 20
  • 91
  • 102
34
votes
2 answers

rsync: --include-from vs. --exclude-from what is the actual difference?

In the documentation, it mentions these as being files containing lists of either patterns to include or patterns to exclude. However, that implies for inclusions, everything is considered an exclusion except where things match patterns. So for…
Craig
  • 4,268
  • 4
  • 36
  • 53
33
votes
3 answers

rsync exclude a directory but include a subdirectory

I am trying to copy a project to my server with rsync. I have project specific install scripts in a subdirectory project/specs/install/project1 What I am trying to do is exclude everything in the project/specs directory but the project specific…
user1036651
  • 407
  • 1
  • 5
  • 12
33
votes
5 answers

rsync incremental file list taking forever

I'm copying from one NAS to another. (Netgear ReadyNAS -> QNAP) i tried Pulling the files by running rsync on the QNAP, and that took forever, so I'm currently trying to push them from the Netgear. The code I'm using is: rsync -avhr /sauce/folder…
Dale King
  • 765
  • 1
  • 6
  • 18