I want to backup a directory from a Linux server (reiserfs) onto an external HDD (hfs) attached to a MacBook running MacOSX 10.13.
It's Gentoo Linux and I have installed rsync version 3.1.2. On MacOSX, I have installed rsync 3.1.2 via Homebrew.
Now, I use the flags -aAxzPiv --delete-delay
. Earlier I also had -X
but because of this upstream rsync 3.1.2 bug I removed it. I connect as root
to the Linux server to have all the rights to read everything and also run it as sudo
on MacOSX. I.e. it is like this:
sudo rsync -aAxzPiv --delete-delay root@server:/mnt/data6 .
It mostly seems to work, except for a few directories/files which are always going to be retransmitted (in some cases deleted first and then transmitted, although I have --delete-delay
). This is what I'm trying to resolve.
So, first question: Is there a nice flag for rsync
which gives me the information why it thinks that it should retransmit/delete? There is -v
, --info
, --debug
which might give me that, but what are the exact flags for those?
(Edit: Thanks meuh, I added -i
now, which helps a bit, although it is still limited.)
I guess this is probably an issue that it didn't correctly preserved the time on the target file. Or maybe on a directory. E.g. I see this:
...
>f..t....... .../Documents/Topologische Spiele und resourcenbeschränkte Baire-Kategorie.pdf
332,553 100% 15.86MB/s 0:00:00 (xfr#87, ir-chk=1062/50500)
...
>f.st..g.... .../OpenLieroX/Tools/GameCompiler/src/main.cpp
14,813 100% 14.13MB/s 0:00:00 (xfr#88, ir-chk=1004/198016)
...
>f.st..g.... .../openlierox/tools/GameCompiler/src/main.cpp
3,891 100% 3.71MB/s 0:00:00 (xfr#95, ir-chk=1003/410613)
...
>f.st....... .../Robot/Main/uMainForm.o
276,724 100% 330.77kB/s 0:00:00 (xfr#93, ir-chk=1455/198859)
...
*deleting .../Reise/SF2015/A1602080010(Zeyer).pdf
*deleting .../Reise/SF2015/
...
.../Reise/SF2015/
.../Reise/SF2015/A1602080010(Zeyer).pdf
126,218 100% 100.29kB/s 0:00:01 (xfr#566, ir-chk=1001/470897)
...
I guess there are multiple issues. E.g. ...resourcenbeschränkte...
might be an Unicode encoding issue. Then there is openlierox
vs OpenLieroX
which might be problematic because the target filesystem is case insensitive. I'm not sure how rsync
should behave in this case of if it even has any special logic for this. Then, e.g. the file uMainForm.o
is always retransmitted, for unknown reasons (but not deleted first). Then, the directory SF2015
including all files is first deleted and then retransmitted.
About the directory which is being deleted. On the server, a stat
on that directory gives me:
$ stat .../texte1
File: '.../texte1'
Size: 8664 Blocks: 17 IO Block: 4096 directory
Device: 811h/2065d Inode: 181281 Links: 45
Access: (0755/drwxr-xr-x) Uid: ( 1002/ gz) Gid: ( 100/ users)
Access: 2016-07-21 03:19:33.000000000 +0200
Modify: 2016-02-06 18:58:10.000000000 +0100
Change: 2016-07-21 03:19:33.000000000 +0200
Birth: -
On the Mac, I get this:
$ stat .../texte1
16777225 8884695 drwxr-xr-x 236 (1002) _lpoperator 0 8024 "Nov 4 14:06:39 2017" "Nov 4 14:02:07 2017" "Nov 4 14:02:07 2017" "Feb 6 18:58:10 2016" 4096 0 0 .../texte1
I guess it gets confused about the times.
So, next question: What flags should I use? Maybe I will resolve the case-insensitive issues by hand, by just renaming that on the source side (it should be rare). Maybe as well for the Unicode issues. But I don't exactly understand the deletions/retransmissions.
Also, maybe I should use another rsync
version on MacOSX? The original MacOSX rsync
is version 2.6.9 and has some other flags and I found that there are more problems but I'm not completely sure.
(Related is this question but it doesn't really answer my questions here. Also this.)
--itemize-changes
(-i
) to get details on why a file is updated. – meuh Nov 03 '17 at 09:13