CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
That "-s 17" is telling the pv command that the expected total size of the transfer is 17 bytes. You're not going to get reasonable progress indications from that. When pv is getting its input from a pipe, that "-s" (--size) argument is the only clue it has about the expected size of the transfer, and you can't, in general, accurately predict how much data rsync will send. If all the files are new at the destination and there is no compression involved, you can estimate by using the total size of all the files plus some overhead. For incremental updates of existing files, it's really difficult to predict.
Last edited by rknichols; 09-12-2017 at 12:33 PM.
Reason: Totally misinterpreting what was going on
ok 17 is the file count and not the size of the directory, so shall i change it to the size, will this give me a better ETA?
That depends on what you mean by, "size of the directory." The directory file itself has a size. That's just for storage of the file names, inode numbers, and some status information. What you need is the total size of the files, like what would be reported by du for that directory. There will be some overhead in addition to that (see how much rsync would send if you use the "-n" option to suppress the actual transfer), but if the files themselves are large it should be a reasonable approximation.
Last edited by rknichols; 09-12-2017 at 12:34 PM.
Reason: Totally misinterpreting what was going on
-l, --line-mode
Instead of counting bytes, count lines (newline characters). The
progress bar will only move when a new line is found, and the
value passed to the -s option will be interpreted as a line
count.
Using the number of files is correct versus byte size when using the -l option. I have not played with rsync/pv in awhile and can not say why the ETA is off at the moment.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.