Questions tagged [rsync]

rsync is a tool to efficiently copy directory hierarchies, locally or remotely, with powerful filters to decide what gets copied.

Selected questions

See also

If rsync doesn't seem to be able to do what you want, also look under .

2080 questions
320
votes
10 answers

Can rsync resume after being interrupted?

I used rsync to copy a large number of files, but my OS (Ubuntu) restarted unexpectedly: sudo rsync -azvv /home/path/folder1/ /home/path/folder2 After reboot, I ran rsync again, but from the output on the terminal, I found that rsync still copied…
Tim
  • 101,790
250
votes
5 answers

How to rsync only new files

I am trying to set up rsync to synchronize my main web server to the remote server by adding newly generated file to the latter. Here is the command that I use: rsync -avh --update -e "ssh -i /path/to/thishost-rsync-key"…
supermario
  • 3,269
167
votes
1 answer

Understanding the output of --info=progress2 from rsync

If I run rsync with --info=progress2, I get an output like 105.45M 13% 602.83kB/s 0:02:50 (xfr#495, ir-chk=1020/3825) But what do the single numbers mean? I haven't found a matching entry in the man page. The first number seems to be the…
muffel
  • 2,818
130
votes
4 answers

How to rsync a directory to a new directory with different name?

I'm doing a data transfer, the old file system relies deeply on a directory which now is on different path. This is a git directory which stores code online. I have no rights to move it or rename it. So what I can do is rsync this directory to the…
Zen
  • 7,537
110
votes
8 answers

rsync ignore owner, group, time, and perms

I want to know how use rsync for sync to folders recursive but I only need to update the new files or the updated files (only the content not the owner, group or timestamp) and I want to delete the files that not exist in the source.
alsanal
  • 1,203
105
votes
8 answers

Using rsync to move (not copy) files between directories?

I have been using rsync to copy files for some time. My understanding is that rsync is faster than cp when some of the files to transfer are already in the destination directory, transferring only the incremental difference (i.e. the "deltas"). If…
100
votes
3 answers

How to rsync multiple source folders

I want to rsync multiple sources and I wonder the best way to achieve that. e.g. /etc/fstab /home/user/download I thought about 3 solutions : Solution 1 multiple call to rsync rsync -a /etc/fstab bkp rsync -a /home/user/download bkp con : harder…
user1437346
  • 1,131
86
votes
9 answers

Does compression option -z with rsync speed up backup

In rsync, --compress or -z will compress file data during the transfer. If I understand correctly, it compresses files before transfer and then decompress them after transfer. Does the time reduced during transfer due to compression outweight the…
Tim
  • 101,790
73
votes
1 answer

How to exclude subdirectory from rsync?

I'm using rsync to recursively sync a remote folder tree that looks something like…
TheEdge
  • 833
59
votes
5 answers

rsync exclude directory not working

I am running Fedora 17 64-bit and the rsync --exclude=/home/ben/ is not working as expected. I am trying to rsync my home directory to a thumb drive, but I want to exclude certainly directories that hold cache files and build files. This is…
Freedom_Ben
  • 4,494
52
votes
1 answer

Delete extraneous files from dest dir via rsync?

Say I have SRC 001.jpg 002.jpg 001.txt a.zip DEST hello.jpg rsync -d --delete SRC:{*.jpg,*.txt} DEST It doesn't remove hello.jpg from DEST, any idea how to archive this?
Cheng
  • 6,641
49
votes
3 answers

Rsync Error 23: Can I tell which files were not transferred?

I ran sudo rsync -va --progress from the root of one external drive to a folder on another external drive. The reason is that the source drive has an error-ful NTFS and I don't have access to a Windows PC to repair the NTFS. 10 hours later it…
themirror
  • 6,988
42
votes
4 answers

How can I slow down rsync?

I'm trying to copy the contents of a failing USB thumb drive. If I read the data too fast, the drive's controller chip overheats and the drive vanishes from the system. When that happens, I need to unplug the drive, wait a minute or so for it to…
Mark
  • 4,244
31
votes
2 answers

Asking rsync to delete files on the receiving side that don't exist on the sending side, with exceptions on the receiving side

I have read these threads: rsync --delete --files-from=list / dest/ does not delete unwanted files Delete extraneous files from dest dir via rsync? But, as far as I can tell (maybe I am missing something), they don't cover the following…
30
votes
1 answer

Why rsync attempts to copy file that is already up-to-date?

I have two same files, on local machine and on remote one. Their sizes are equal, and file on local machine is newer than on remote one - but rsync still attempts to copy the file. I invoke rsync as follows: rsync -nv -e "ssh -p 2222"…
Rogach
  • 6,303
1
2 3
28 29