I'm writing a wrapper around a large number of rsyncs that need to happen, and it would be great if I could parse the output of a running rsync and find out how far along it is. To do this, I would need to know how many files the rsync is going to transfer. If I run 'rsync -avz --progress', it tells me how many files it is considering, but not how many it actually needs to update. Does anyone know how to get rsync to show how many files it will actually update? Thanks! ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- -------------- next part -------------- HTML attachment scrubbed and removed
If you perform a dry run (-n) with --stats, before the actual run (will only add an overhead of typically a few seconds. a few minutes at worst depending on size) you can get an idea of the "number of files to be transferred" and "total transferred file size", although the latter is (as adequately labeled) "total", and does not represent the lower total size that would be transferred after skipping any similar blocks. _____ From: rsync-bounces+linux=prisma.com.mt@lists.samba.org [mailto:rsync-bounces+linux=prisma.com.mt@lists.samba.org] On Behalf Of Eric Busto Sent: 22 February 2007 20:51 To: rsync@lists.samba.org Subject: Number of files to be transferred? I'm writing a wrapper around a large number of rsyncs that need to happen, and it would be great if I could parse the output of a running rsync and find out how far along it is. To do this, I would need to know how many files the rsync is going to transfer. If I run 'rsync -avz --progress', it tells me how many files it is considering, but not how many it actually needs to update. Does anyone know how to get rsync to show how many files it will actually update? Thanks! _____ This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. _____ -------------- next part -------------- HTML attachment scrubbed and removed
Yeah, I came to that conclusion unfortunately after adding in the printf. :/ Thanks! -----Original Message----- From: hashproduct@gmail.com [mailto:hashproduct@gmail.com] On Behalf Of Matt McCutchen Sent: Thursday, February 22, 2007 4:01 PM To: Eric Busto Cc: Julian Pace Ross; rsync@lists.samba.org Subject: Re: Number of files to be transferred? On 2/22/07, Eric Busto <EBusto@nvidia.com> wrote:> Looks like I just need to print out file_list.count.No, that gives the total number of files rsync is considering, not how many it is going to transfer. There is no way to determine how many files rsync is going to transfer short of a dry run. Matt ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------