Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to move my emails Maildir from an old centos server to a new debian server.

rsync -avz /home/me/Maildir ssh root@ipaddress:/var/vmail/me/Maildir

I tried to copy an 8gb account, didn't work, try to move another about 20mb, didn't work, tried to use

-avn, didn't work either.

sync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1039) [sender=3.0.6]

share|improve this question
What do the previous errors say? –  jordanm Apr 13 '13 at 1:39
@jordanm there's no previous error, it just says that there's a previous error, but i haven't seen any error –  Fischer Apr 13 '13 at 13:23

2 Answers 2

up vote 1 down vote accepted

Error 23 is defined as a "partial transfer" and might be caused by filesystem incompatibilities, such as different character sets or access control lists. In this case it could be caused by files in /home that begin with a . and are thus marked hidden.

In this case you could try something like:

rsync -avz --exclude='/*/.local' /home/me/Maildir ssh root@ipaddress:/var/vmail/me/Maildir

The verbose argument -v should actually give you some sort of list of the problems.

share|improve this answer
the above line gave the same error –  Fischer Apr 13 '13 at 13:23
The above line was meant as an example how to exclude one hidden directory, if you have more you probably have to adjust the line. –  superuser0 Apr 13 '13 at 13:43
i needed to changed the permissions of the directories as well –  Fischer Apr 14 '13 at 9:57

How can i get the status (Success/Failure)?

I have a shell file rsyncCommand.sh with code as below which generates RsyncLog.txt file. I want to add a column success/failure and check whether rsync was a success or a failure. In addition , want o send an email notification in case it was a failure.

startdate=$(date +"%m-%d-%Y %r")
starttime=$(date +"%m-%d-%Y %r")
touch $fileCreationPath/lock.file
chmod 777 $fileCreationPath/lock.file
eval "find $fileCreationPath/RsyncLog.txt"
if [ "$status" == "0" ];

echo "RsyncLog.txt File Exists "
touch $fileCreationPath/RsyncLog.txt
echo -e "StartDate \t\t FolderName \t\t StartTime \t\t EndTime" >>/$fileCreationPath/RsyncLog.txt

rsync -e ssh -avzr --delete $sourcePath/weblayout/ $destination:$destinationPath/weblayout/
echo -e "$startdate\t\t weblayout\t\t\t$starttime\t\t$(date +"%m-%d-%Y %r")" >> $fileCreationPath/RsyncLog.txt
starttime=$(date +"%m-%d-%Y %r")
rsync -e ssh -avzr --delete $sourcePath/vault/ $destination:$destinationPath/vault/
echo -e "$startdate\t\t vault \t\t\t$starttime\t\t$(date +"%m-%d-%Y %r")" >> $fileCreationPath/RsyncLog.txt
starttime=$(date +"%m-%d-%Y %r")
rsync -e ssh -avzr --delete $sourcePath/data/ $destination:$destinationPath/data/
echo -e "$startdate\t\t data \t\t\t$starttime\t\t$(date +"%m-%d-%Y %r")" >> $fileCreationPath/RsyncLog.txt
starttime=$(date +"%m-%d-%Y %r")
rsync -e ssh -avzr --delete $sourcePath/custom/ $destination:$destinationPath/custom/
echo -e "$startdate\t\t custom\t\t\t$starttime\t\t$(date +"%m-%d-%Y %r")" >> $fileCreationPath/RsyncLog.txt
starttime=$(date +"%m-%d-%Y %r")
rsync -e ssh -avzr --delete $sourcePath/classes $destination:$destinationPath/classes/
echo -e "$startdate\t\t classes\t\t\t$starttime\t\t$(date +"%m-%d-%Y %r")" >> $fileCreationPath/RsyncLog.txt
rm $fileCreationPath/lock.file
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.