Questions tagged [rsync]

Rsync is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon

Rsync is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon. It offers a large number of options that control every aspect of its behavior and permit very flexible specification of the set of files to be copied. It is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination. Rsync is widely used for backups and mirroring and as an improved copy command for everyday use.

Rsync website

1612 questions
275
votes
3 answers

What is archive mode in rsync?

I know you can use -a or --archive to activate archive mode when using rsync. Unfortunately, I have no idea what archive mode is supposed to do, and the man page is not at all explicit about what this is: equals -rlptgoD (no -H,-A,-X) Can you…
allyourcode
  • 2,897
  • 2
  • 17
  • 6
139
votes
5 answers

Rsync difference between --checksum and --ignore-times options

Can anyone clarify the differences between the --checksum and --ignore-times options of rsync? My understanding is as follows: --checksum If the file size and time match, it will do a checksum at both ends to see if the files are really…
Andy Madge
  • 1,657
  • 3
  • 14
  • 14
93
votes
2 answers

Rsync creates a directory with the same name inside of destination directory

When I run this command rsync -avzp --del -e "ssh -p myport" user@hostname:/var/www/tests /var/www/tests files get synchronized but instead of saving files in /var/www/tests, Rsync creates one more directory "tests" inside of existing…
javi007
  • 933
47
votes
6 answers

Rsync daemon: is it really useful?

Are there any practical benefits in using rsyncd compared to rsync over ssh? Does it really increase speed, stability, anything?
kolypto
  • 11,218
42
votes
7 answers

Handling renamed files or directories in rsync

I am working on an rsync script for directory replication. I have it syncing only new and modified files or directories but I don't like the fact that it's copying renamed files or directories as a new file or directory, keeping the files not in…
jmituzas
  • 533
24
votes
5 answers

rsync is just hanging, building file list

[root@centos /]# rsync -av --exclude thumbs /storage root@xx.27.1.xx:/storage root@xx.27.1.xx's password: building file list ... I've been sitting for about an hour... it's 135GB of images and folders /storage is a mounted ext3 scsi drive. Is it…
22
votes
5 answers

How to speed up rsync for small files

I'm trying to transfer thousands of small files from one server to another using the following command: rsync -zr --delete /home/user/ user@10.1.1.1::backup Currently the transfer takes a long time (I haven't timed it). Is there way to make this…
Noodles
  • 1,396
19
votes
6 answers

rsync - report only uploaded files

I have a problem with rsync: either it shows me all files in the directories I am rsyncing (if using the flag -v) or nothing at all (when not using -v). I would like to have rsync quiet except for the files which actually had to be uploaded to the…
blueFast
  • 4,340
  • 14
  • 38
  • 55
17
votes
3 answers

rsync - exclude all directories except a few

There appear to be a lot of SF and SO questions out there about this, but none seem to match my requirements. source_dir/ some_dir/ another_dir/ some_file.php some_other_file.txt include_this_dir/ include_that_dir/ yet_another_dir/ So…
Tom Auger
  • 361
15
votes
2 answers

Complex includes/excludes with rsync

I'm trying to work out the rsync filter syntax to perform complex include/excludes, and trying to achieve the following: Include / Exclude /home Include /home/user1/* Include /home/user2/subdir/* I've tried many variations on the filter syntax, and…
13
votes
4 answers

How to cleanup after failed rsync?

I killed a local "rsync -ah" process. It left junk files like ".abc.vmdk.zxivMN" in the target directory. The junk files do not get deleted on consecutive "rsync -ah" runs. Details: I ran diff on both folders I was syncing and it reported: "Only in…
user27465
  • 259
  • 1
  • 2
  • 7
13
votes
3 answers

How to add timestamp and file list to rsync log?

I want to add both timestamp and file list to the log. Currently, I can only get one. The following command to can track the updated file list but it does not add timestamp. rsync -avz --progress --delete /web/path/public_html/…
garconcn
  • 2,418
  • 8
  • 36
  • 46
13
votes
4 answers

Tell Rsync to Skip Current file During Transfer?

Is there a way to tell rsync to skip its current file while a sync is in progress, maybe by sending it a particular signal? I already know about ignoring based on patterns, but this would be handy to me sometimes.
Kyle Brandt
  • 84,369
11
votes
1 answer

Does rsync overwrite the new file

i use rsync -avh I just want to know that if the file on destination already exists does the rsync overwrite the new file or not
John
9
votes
2 answers

rsync "Operation not permitted"

I am trying to so a simple rsync to a USB hard disc, the command is rsync -az --modify-window=2 /home /mnt/exthd/tmp/ I am running this as root. but I get a lot of errors that all seem to relate to insufficient permissions : rsync: chown…
1
2 3
12 13