From a Linux box, I recently mounted a Windows share using CIFS.
The intent was to "locally" use
rsync to backup my Windows machine.
The command line used to mount the Windows drive is something like:
mount \\192.168.1.74\share /cifs1 -t cifs -o noserverino,iocharset=utf8,ro
Please also note that the drive attached to the Linux box is formatted NTFS.
When doing a sample backup,
rsync was always re-copying the directories (names), but not the files. After looking more closely at the
ls -lh output at both ends, I noticed that on the Linux side the size of the directory level is always 0:
TTT-Admin@1080-Router:/tmp/mnt/RT-1080/tmp# ls -lh drwxrwxrwx 1 TTT-Admi root 0 Feb 8 12:14 DeltaCopy
but the size of the directory level on the CIFS side was always different from 0:
TTT-Admin@1080-Router:/cifs1/temp/Rsync-Packages# ls -lh drwxr-xr-x 1 TTT-Admi root 8.0K Feb 8 12:14 DeltaCopy
This difference explains why
rsync was always recopying directories, but not recopying the folders (which was correct, folder sizes and time stamps being the same on both ends).
rsync command is:
rsync -av /cifs1/Temp/Rsync-Packages/DeltaCopy /mnt/RT-1080/tmp/rsync -av /cifs1/Temp/Rsync-Packages/DeltaCopy /mnt/RT-1080/tmp/
Is a directory supposed to "have a size" or not? What should I do to solve this discrepancy ?