First off, thanks for the reply.
The script would be something like this:
- perform a dry run
- catch the list of files in the output
- calculate total file size
- perform the actual run
- catch the output of rsync and calculate the size of every file transferred.
- substract this from the total file size.
- suppress all rsync output and show your progress bar.
^ that's what I was thinking except, instead of using rysnc's output to calculate, use the actual directory size.
- perform the dry run
- grab the 'total size' from rsync's output
- convert to KB
- add that total size to the current size of the backup directory = $total
- run rsync in the background
- use something like 'du -s' in a loop to grab the dir's current size compared to the expected $total and use that for the progress bar
I believe that would work but, would it be a decent solution? The extra time required for the dry run is fine by me. For now anyway. This is my first bash script and it's more or less for the learning experience. My script as is does what I need it to. The progress bar is just to give myself a new problem to solve.