11

I wanted to copy files from the Windows drive to external HDD using rsync, with the following command:

rsync -azv --progress --exclude-from '/home/mint/exclude.txt' '/media/mint/OS/' '/media/mint/external_hdd/C_drive_backup/'

In exclude.txt I had Windows, Program Files and ProgramData folders, since I don't need them. So I initiated the command given above and went to sleep. When I woke up, here's what I got:

sent 169,748,362,821 bytes  received 3,982,112 bytes  16,898,347.01 bytes/sec
total size is 193,085,110,161  speedup is 1.14
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1183) [sender=3.1.0]  

So should I be worried that something didn't get copied? If I use the command du -hs /media/mint/OS/* | sort -h and calculate the total size I should get, it's something around 187 GB (compared to rsync's output in bytes to gigabytes: 169,748,362,821 -> ~158GB. 193,085,110,161 -> ~179GB.)

Can I see which files/folders did not get copied? If I scroll up, I can see the last 200 lines and all of those have 100% completion.

Should I just copy the files again? Or is there a way to compare the files on external HDD and the Windows drive?

4 Answers 4

8

If you haven't saved the whole output from rsync, then the only way to find what wasn't copied is to run another traversal to compare. You might as well run rsync again: its whole point is not to transfer what has already been transferred. Don't pass the -v parameter so that you won't be overwhelmed by boring output.

rsync -aq … 2>rsync.err

(You can use rsync -anq … to compare without transferring, but if you've just made a copy, it won't copy anything again, so -n doesn't make any difference in this scenario.)

2

If neither the source or destination has been changed, an option is to run rsync again with the -n switch to see what what would be transferred without copying data. Adding -q will suppress regular output, only displaying files that could not be transferred.

rsync -azvqn --exclude-from '/home/mint/exclude.txt' '/media/mint/OS/' '/media/mint/external_hdd/C_drive_backup/'
0

When I was facing exactly same error (while copying a folder from remote ubuntu server to my local ubuntu pc), I could resolved this easily, by changing the source location to be at root (made it less deep).

If that wouldn't have resolved the problem, next step would have been to choose target location too as less deep, as possible.

0

Tal ves les sirva; los errores rsync:

rsync: [generator] chgrp "MyCarpeta" failed: Operation not permitted (1)

y el error:

rsync: [receiver] chgrp "MyCarpeta/MyArchivo.txt.eUTRTC" failed: Operation not permitted (1)

Los anteriores errores solo me ocurren cuando ejecuto el rsync en unidades formateadas con NTFS (pero si hace la copia), en las unidades formateadas con EXT4 no genera estos errores (la copia es optima).

Los archivos origen se encuentran en un S.O Debian donde el formato de unidad es EXT4.

Solucioné el problema raíz, formatenado las unidades NTFS en EXT4.

Ojalá les sirva de algo, saludos.

1
  • Welcome to the site, and thank you for your contribution. Please note however that the language of communication on this site is englich, so contributors are requested to post in english. You may try to use the google translator to translate your answer.
    – AdminBee
    Commented Jul 17 at 11:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .