How to examine the fast output of rsync

rsync

I am using rsync for backup about 100GB files and directories. My command is

sudo rsync -azvv /home/path/folder1/ /home/path/folder2

However, the output for each file goes up so quickly and there are so many files, that I worry if there are some errors I cannot catch. So I wonder how you would catch any errors during backup?

Best Answer

Redirect the error stream to a file that you can read later. The verbose output goes to standard output whereas errors go on standard error.

sudo rsync -azvv /home/path/folder1/ /home/path/folder2 2>rsync-errors
echo $?
cat rsync-errors

Alternatively, instead of using verbose mode, use --progress or -P to just see a progress indicator, that way you will see error messages scroll by. It is possible that they'll scroll too fast if there are a lot of them.

In any case, check that the return status of rsync is 0, indicating that there were no errors.

Related Question