Problem with --link-dest when syncing AIX to Linux
Markus Marquardt
markus.marquardt at atosorigin.com
Fri Mar 5 16:14:30 GMT 2004
Hello,
i'm using rsync 2.6.0 for daily-syncing some remote AIX 5.2 machine to a
local linux (RH 7.3) with using the --link-dest option for saving space
on incremental backups.
Even if there are no changes on the AIX machine, all files are newly
transferred on every new sync.
My test scenario (actisi=remote aix machine, actisa=local linux machine):
=====> Initial rsync
[mma at actisa rsync-2.6.0]$ ./rsync -av actisi:remotetest/ test1/
receiving file list ... done
./
file1
file2
wrote 56 bytes read 203 bytes 103.60 bytes/sec
total size is 14 speedup is 0.05
=====> Check if anything left...
[mma at actisa rsync-2.6.0]$ ./rsync -av actisi:remotetest/ test1/
receiving file list ... done
wrote 16 bytes read 101 bytes 46.80 bytes/sec
total size is 14 speedup is 0.12
=====> All fine, now using --link-dest for incremental rsync
[mma at actisa rsync-2.6.0]$ ./rsync -av --link-dest=../test1
actisi:remotetest/ test2/
receiving file list ... done
./
file1
file2
wrote 68 bytes read 189 bytes 102.80 bytes/sec
total size is 14 speedup is 0.05
=====> Oooops. Why were file1 and file2 transferred?
I did some debugging and found out that the problem seems to be in the
function skip_file() in generator.c:
if (link_dest) {
extern int preserve_perms;
extern int preserve_uid;
extern int preserve_gid;
if(preserve_perms
&& (st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT))
return 0;
This is always true when rsyncing AIX -> linux, look at this gdb output:
(gdb) print /o st->st_mode
$13 = 0100644
(gdb) print /o file->mode
$14 = 0500644
Nasty AIX always adds 0400000 to the file mode which then breaks this
condition. I've not found anything about this value in the AIX includes
(mode.h). Is there any way to mask this bit out for AIX to make rsync
better working?
Regards,
Markus
More information about the rsync
mailing list