I have a strange issue with rsync: some files are not saved on the remote host.
On my Windows 2012 server i'm using:
rsync --progress --no-compress --partial -avshW "/cygdrive/d/foto" '[email protected]:/usb/backup' | wintee C:\BAT\logs\backup_foto.log 2>&1
I am getting output like this:
foto/2013/01/xx xx xx/IMG_5536.JPG
32.77K 1% 189.35kB/s 0:00:11 1.15M 49% 921.05kB/s 0:00:01 2.26M 98% 221.09kB/s 0:00:00 2.29M 100% 224.34kB/s 0:00:09 (xfer#2, to-check=1304/35107)
foto/2013/01/xx xx xx/IMG_5537.JPG
32.77K 1% 6.25MB/s 0:00:00 491.52K 15% 348.84kB/s 0:00:07 1.38M 42% 565.42kB/s 0:00:03 1.54M 47% 388.83kB/s 0:00:04 2.59M 79% 406.17kB/s 0:00:01 3.11M 95% 414.84kB/s 0:00:00 3.26M 100% 420.75kB/s 0:00:07 (xfer#3, to-check=1303/35107)
foto/2013/01/xx xx xx/IMG_5538.JPG
32.77K 1% 1.95MB/s 0:00:01 360.45K 14% 75.86kB/s 0:00:26 1.41M 58% 195.29kB/s 0:00:05 2.41M 100% 301.40kB/s 0:00:07 (xfer#4, to-check=1302/35107)
foto/2013/01/xx xx xx/IMG_5539.JPG
32.77K 1% 42.33kB/s 0:01:05 65.54K 2% 33.60kB/s 0:01:21 589.82K 21% 150.71kB/s 0:00:14 1.64M 58% 163.72kB/s 0:00:07 2.16M 77% 194.01kB/s 0:00:03 2.69M 95% 255.82kB/s 0:00:00 2.81M 100% 229.96kB/s 0:00:11 (xfer#5, to-check=1301/35107)
foto/2013/01/xx xx xx/IMG_5540.JPG
32.77K 1% 2.60MB/s 0:00:01 393.22K 13% 359.21kB/s 0:00:06 1.28M 45% 603.19kB/s 0:00:02 1.97M 69% 421.33kB/s 0:00:02 2.49M 87% 388.68kB/s 0:00:00 2.83M 100% 440.40kB/s 0:00:06 (xfer#6, to-check=1300/35107)
However the files are never created on the remote host!
root@pinew:/usb/backup/foto/2013/01/xx xx xx# ls -al
total 8
drwx------ 2 matthijs matthijs 4096 Jan 27 2013 .
drwx------ 5 matthijs matthijs 4096 Jan 27 2013 ..
And to make it even stranger the 'foto' (photo) directory contains stuff like "2011" "2012" "2013" and for example the 2011 and 2012 directory ARE synced!
So: how is it possible that only one (or perhaps some more dir's I didn't find yet) directory is not pushed to the remote host?
Source: Windows 2012 server
Destination:
Raspberry pi: Linux pinew.xxxx.nl 3.10.24+ #614 PREEMPT Thu Dec 19 20:38:42 GMT 2013 armv6l GNU/Linux
edit:
@rxt
Well wtf indeed the 2013 directory has other permissions than the other directories:
drwx------ 14 matthijs matthijs 4096 Aug 15 2012 2010
drwx------ 30 matthijs matthijs 4096 Aug 15 2012 2011
drwx------ 25 matthijs matthijs 4096 Mar 24 2013 2012
d--------- 16 matthijs matthijs 4096 Dec 22 12:33 2013
That's strange because i didn't create them rsync did. However when i remove the directory and restart the rsync job it get created again with the same permissions!
So I think the question is: why does 1 directory get different permissions then the others? I checked it on windows but they have the same security settings!
edit2:
Solution:
Add the following --chmod=u+rwx
to your rsync command!
(or manually set the permissions but in that case you never can be sure if it succeeds or not)