Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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)

share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.