Logging rsync results using >> not getting all output
Matt McCutchen
matt at mattmccutchen.net
Thu Feb 28 19:36:29 GMT 2008
On Thu, 2008-02-28 at 11:33 -0600, Tyler Krehbiel wrote:
> I currently use a patched version of rsync 2.6.3 with support hfs+
> file systems. Running on Mac OS 10.4 (Server). It works great but I
> cant get the output to work correctly.
>
> This is the command I use in the script:
> rsync -av --hfs-mode=appledouble /Volumes/x/x/
> root at 192.168.1.1:/Volumes/x/x/x/x/ >> $LOGS
>
> This give me output like this:
>
> building file list ... done
> Personnel/Library
> Installers/RealPlayer.app/Contents/Frameworks/HXClientKit.framework/Versions/A/Headers/
> Personnel/Library
> Installers/RealPlayer.app/Contents/Frameworks/HXClientKit.framework/Versions/A/Resources/
> Personnel/Library
> Installers/RealPlayer.app/Contents/Frameworks/RNControls.framework/Versions/A/Headers/
> Personnel/Library
> Installers/RealPlayer.app/Contents/Frameworks/RNControls.framework/Versions/A/Resources/
>
> All is well, but I am realizing that it is not logging information
> like this, I am only able to get this if I run manually:
>
> rsync error: some files could not be transferred (code 23) at
> main.c(702)
> rsync: chgrp
> "/Volumes/BackupDrive/Backups/x/Volumes/x/x/studenttest/RECYCLER/S-1-5-21-340522140-3920632414-2425575602-1391/D at 1/Favorites/Documents" failed: No such file or directory (2)
You are redirecting only rsync's stdout to the log file, while rsync is
printing the error messages to stderr. You can redirect the stderr too
by adding 2>&1 to the end of the command line.
Matt
More information about the rsync
mailing list