Hansjoerg Lipp
2015-Apr-24 03:21 UTC
Hard links: incomplete backup or rsync does not terminate
Hi all, when running backups, rsync sometimes does not terminate. I finally managed to create a small test case which reproduces this behaviour (another night without sleep, so sorry for the bad English...): Using rsync 3.1.0 [no change in a quick test I ran after compiling 3.1.1] on Linux (x86_64) the following sequence causes rsync not to terminate:> mkdir srclt2 > cd srclt2 > echo x > a > ln a b > cd .. > cp -aix srclt2 dstlt2 > rm dstlt2/b > mkdir baklt2 > rsync -cavvHAXSl --exclude=gvfs --exclude=.gvfs --compare-dest=$PWD/dstlt2/. $PWD/srclt2/. $PWD/baklt2/. >> testlt2.log 2>&1The log (after SIGINT) is:> sending incremental file list > delta-transmission disabled for local transfer or --whole-file > ./ > a is uptodate > b > a => b > rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(632) [sender=3.1.0] > rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at io.c(530) [generator=3.1.0]The backup is:> $ ls -il srclt2 dstlt2 baklt2 > baklt2: > total 8 > 21052666 -rw-r--r-- 2 xx users 2 2015-04-24 99:99 a > 21052666 -rw-r--r-- 2 xx users 2 2015-04-24 99:99 b > > dstlt2: > total 4 > 21052664 -rw-r--r-- 1 xx users 2 2015-04-24 99:99 a > > srclt2: > total 8 > 21052663 -rw-r--r-- 2 xx users 2 2015-04-24 99:99 a > 21052663 -rw-r--r-- 2 xx users 2 2015-04-24 99:99 bInterestingly, the following sequence does terminate, but the resulting backup is incomplete.> mkdir srclt > cd srclt > echo x > a > ln a b > echo x > c > ln c d > cd .. > cp -aix srclt dstlt > rm dstlt/{b,c} > mkdir baklt > rsync -cavvHAXSl --exclude=gvfs --exclude=.gvfs --compare-dest=$PWD/dstlt/. $PWD/srclt/. $PWD/baklt/. >> testlt.log 2>&1The log is:> sending incremental file list > delta-transmission disabled for local transfer or --whole-file > ./ > a is uptodate > d is uptodate > b > a => b > total: matches=0 hash_hits=0 false_alarms=0 data=2 > > sent 212 bytes received 160 bytes 744.00 bytes/sec > total size is 8 speedup is 0.02And the incomplete backup is:> $ ls -il srclt dstlt baklt > baklt: > total 8 > 21052662 -rw-r--r-- 2 xx users 2 2015-04-24 99:99 a > 21052662 -rw-r--r-- 2 xx users 2 2015-04-24 99:99 b > > dstlt: > total 8 > 21052660 -rw-r--r-- 1 xx users 2 2015-04-24 99:99 a > 21052659 -rw-r--r-- 1 xx users 2 2015-04-24 99:99 d > > srclt: > total 16 > 21052657 -rw-r--r-- 2 xx users 2 2015-04-24 99:99 a > 21052657 -rw-r--r-- 2 xx users 2 2015-04-24 99:99 b > 21052658 -rw-r--r-- 2 xx users 2 2015-04-24 99:99 c > 21052658 -rw-r--r-- 2 xx users 2 2015-04-24 99:99 dCan anybody reproduce this? Is this a known issue? Kind regards, Hansjoerg