Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get rsync to show only error messages AND a summary?

Tags:

rsync

I use rsync to backup a few thousands of files and pipe the output to a file. Given the number of files I'd like to see a list of only those transfers that had issues as well as a summary to show which completed.

So, using the -q flag displays nicely by exception any error only. Using --stats shows a helpful summary at the end.

The problem is that I cannot combine them because it appears that -q suppresses the stats output.

Any ideas welcome.

like image 905
NoExpert Avatar asked Apr 29 '15 16:04

NoExpert


People also ask

How do I get rsync to show progress?

Method 1: Using –progress option to see the rsync progress:Use the “–progress” in the rsync command and “-av” to get a summary at the end of file transfer, consisting of transfer rate, sent/receive bytes, speed of transfer, and total file size.

What does verbose mean in rsync?

-v, --verboseA single -v gives you information about what files are being transferred and a summary at the end. Two -v options give you information on what files are being skipped and slightly more information at the end. More than two -v options should only be used if you are debugging rsync.

What is rsync AV?

Rsync, which stands for remote sync, is a remote and local file synchronization tool. It uses an algorithm to minimize the amount of data copied by only moving the portions of files that have changed.

What is rsync archive?

rsync is a useful and efficient synchronization tool for transferring files and directories. rsync works in the archive mode if the -a option is passed. It synchronizes the directories recursively. It also keeps the ownership of users and groups, permissions, symbolic links (symlinks), and timestamps.


1 Answers

This did the trick for me :

rsync -azh --stats <source> <destination>
like image 162
rizz Avatar answered Oct 23 '22 17:10

rizz