How to hide rsync output for existing and synced files?

I have the output:

sent 66 bytes  received 12 bytes  156.00 bytes/sec
total size is 204  speedup is 2.62
sending incremental file list

sent 67 bytes  received 12 bytes  158.00 bytes/sec
total size is 204  speedup is 2.58
sending incremental file list

sent 66 bytes  received 12 bytes  156.00 bytes/sec
total size is 204  speedup is 2.62
sending incremental file list

sent 67 bytes  received 12 bytes  158.00 bytes/sec
total size is 204  speedup is 2.58
sending incremental file list

sent 67 bytes  received 12 bytes  158.00 bytes/sec
total size is 204  speedup is 2.58
sending incremental file list

sent 67 bytes  received 12 bytes  158.00 bytes/sec
total size is 204  speedup is 2.58
sending incremental file list

sent 67 bytes  received 12 bytes  158.00 bytes/sec
total size is 204  speedup is 2.58
sending incremental file list

sent 67 bytes  received 12 bytes  158.00 bytes/sec
total size is 204  speedup is 2.58
sending incremental file list
mysql-bin.000118
            204 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/1)

sent 229 bytes  received 35 bytes  528.00 bytes/sec
total size is 204  speedup is 0.77

Is there a way to show only:

sending incremental file list
mysql-bin.000118
            204 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/1)

sent 229 bytes  received 35 bytes  528.00 bytes/sec
total size is 204  speedup is 0.77

Which is the only missing file.

Edit: Thanks BowlOfRed, I was using:

rsync -azvp --progress --ignore-existing

Now I am using as in the answer and it’s working.

rsync -azp --info=name,progress --ignore-existing
Asked By: Potter

||

You don’t mention how you’re invoking rsync or what version you’re using. This looks like you’re using -P, which sets things similar to -v in providing both the incremental list progress as well as the stats at the end.

I don’t know a way to provide the "sending incremental" and ending stats only for covered transfers, but you could remove them both and give only the progress/incremental so that the output is silent when no files are transferred. With rsync 3.x, this is best done by replacing -P with more fine-grained invocations of --info.

Example with rsync 3.2.7:

$ rsync -a --info=name,progress dir/ dir2
$ touch dir/a
$ rsync -a --info=name,progress dir/ dir2
a
              0 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=2/4)
$
Answered By: BowlOfRed
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.