Progress bar's aren't intelligent things that somehow keep track of the progress of an operation on their own. You as the programmer need to know where you are in the operation and undate the progress bar to reflect this. So this means you need to know just how much of the operation has taken place at any given point in time.
If you start up an rsync process from your application there is no way to know how much progress has taken place, just as if you started up rsync from the terminal. Rsync does it's thing and you want for the terminal prompt to come back to know it is done.
So in this case there is no way to meaningfully update a progress bar.
However there is that --progress argument to rsync that does print out something on the terminal which sort of informs the user as to what is going on. If you read the explanation of the progress argument you'll see that rsync might not know just how much progress it has made, it's a bit of a guess for it also.
Now if you really wanted to you could capture rsync's output in your program parse the line it is printing and use that information to update a progress bar but to be honest this is a lot more work then, for me at least, it is worth.
Operations like this are usually best indicted by using the indeterminate progress indicator,
You let the user know something is going on but you don;t rally know how long the operation will take.