0

I'm copying some files locally from one directory to another using rsync, the options I'm using are -aPhW. The -P gives me a progress bar, and tells me how many transfers are left, such as (xfer#34171, to-check=851/35759). however that 35759 wasn't always there. It started off at about 10000 and then went up every now and then as rsync was copying other files.

This is less than ideal. I'd like to know from the start how many files are to be copied. Is there some way to force this in rsync?

Amandasaurus
  • 31,471
  • 65
  • 192
  • 253

1 Answers1

4

What version of rsync are you running?

Rsync version 3 can start copying before building a complete file list, which is an advantage if you're backing up lots of data ;)

Forcing it to use an older protocol should force it to build a complete file list.

rsync -aPhW --protocol=28

We moved to rsync 3 recently to see would this feature improve our backup times. It hasn't been running long enough to get proper statistics on how big an improvement it really is, but from the first few runs it seems to have taken about an hour off the total backup time (the job generally runs for about 8 hours)

theotherreceive
  • 8,365
  • 1
  • 31
  • 44
  • 2
    I had to transfer lots of small files once. tar or version 3 was the only way. I came back after the weekend and the transfer with version 2 had not started, and rsync had used a few gigs of RAM :-) – Kyle Brandt Jul 16 '09 at 16:14