X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; q=dns; s=default; b=f4T jAZJjV7VzMdemCnRQuULlkS/p3baL4OcjAucCn8AyWGIxDA1Wv6G7pAo/A097b8G 6l9RDI34IWGCZnpZlReTlOgqek7kAt43/peO29/G/ovNalMg48f/VR+qq0evx8Nn 3T5mkKu1rJHa0ia69myAn2bjXQ8uzz+jIh/PC/vI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; s=default; bh=UF1UYOCBO lCRIAYALpri8esgS64=; b=jGlwP3OciXrAvmg/7VpyeQhv9U7M4vRNI5f4CCwql BZlAbKIpMjDMK4TPSZ9UbG3eQES9iDKfcZAxnay2TvJ8f/+whDNaikognQsAVOR2 qxGeAGN9K5UtjMOo3FHeKp7DLWINV0CedBt33sUHo1KsYP3EDSYLWiYel0pfrhwa dM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f177.google.com X-Received: by 10.194.86.165 with SMTP id q5mr196495112wjz.10.1420571002056; Tue, 06 Jan 2015 11:03:22 -0800 (PST) Message-ID: <54AC3179.4010703@gmail.com> Date: Tue, 06 Jan 2015 20:03:21 +0100 From: LEGOND Fabrice User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: [RSYNC] bad modify/change time set by rsync ? Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hi, I use cygwin for a long time now. And I often use rsync to do incremental backup and mirroring of data. I noted several times in the past that rsync keeps copying some NOT MODIFIED files (always the same ones) again and again whereas it was working correctly for the vast majority of the remaining files. I see this problem for a long time ie on the cygwin 1.6/1.7 32 and 64 bit versions. It is difficult to reproduce the bug because I don't know what causing it. It can happen between remote (linux ssh - ext3/reiserfs/ext4 partitions) source and a target local NTFS, a remote source and a target local exFat, between 2 local ntfs partitions and between a local NTFS and a local target exFat (which has no right management). I have tried check permissions (because it was the most evident culprit to me) and tried to test many options combination of rsync (-X, -g, -no-g, -o, -no-o, -no-p, -p, -a, -t) and read numerous threads, but no luck here. Then, I checked the time and, rarely, on some files, the rsync does not seem to be able to correctly set the modify and change time of the target file. This problem is reproducible as soon as you have a bad file (but very few are): it will always be resynchronized whatever rsync options you set (even with/out -t/-a). Here an example of "malicious" file after a synchronization (with/out different combinations of -g -no-g -no-o -no-p -p -o, with/out some other obscure options, even after removing the target and its parents directory, but always with -t ...). stat of the source file (ntfs): File: '/cygdrive/e/Dev_Gen/android/apps/apk/Adobe_Flash_Player_10.1.120.1.apk' Size: 4544329 Blocks: 4480 IO Block: 65536 regular file Device: 54275946h/1411864902d Inode: 2002648394446585555 Links: 1 Access: (0600/-rw-------) Uid: ( 1001/ xxx) Gid: ( 513/ Aucun) Access: 2014-11-05 22:18:30.000000000 +0100 Modify: 2014-05-19 14:52:43.000000000 +0200 Change: 2014-05-19 14:52:43.000000000 +0200 Birth: 2014-06-14 17:28:05.870000000 +0200 stat of the destination file (exfat): File: '/cygdrive/f/backup_data/Dev_Gen/android/apps/apk/Adobe_Flash_Player_10.1.120.1.apk' Size: 4544329 Blocks: 4608 IO Block: 65536 regular file Device: e65d19c0h/3864861120d Inode: 2344130775972094377 Links: 1 Access: (0600/-rw-------) Uid: ( 1001/ xxx) Gid: ( 513/ Aucun) Access: 2015-01-06 16:59:00.000000000 +0100 Modify: 2014-05-19 14:52:44.000000000 +0200 Change: 2014-05-19 14:52:44.000000000 +0200 Birth: 2014-10-26 14:37:20.570000000 +0100 You can see here that: * the Modify/Change time differ from one second. Why ? * The Birth time value of the target file is impossible for me to understand but should not have any side-effect. However, is it a problem with cygwin ? * blocks should be irrelevant here because it can differ from FS to FS. Even after deleting the target, you get the same Modify/Change/Birth but the access time differ as the target file contains the (effective) date of the copy. On another "not malicious" file, you can see what seem the correct time in the two files. stat of the source file (ntfs): File: '/cygdrive/e/Dev_Gen/android/apps/apk/Adobe_Flash_Player_11.1.115.81.apk' Size: 4708736 Blocks: 4608 IO Block: 65536 regular file Device: 54275946h/1411864902d Inode: 14702358681444365420 Links: 1 Access: (0600/-rw-------) Uid: ( 1001/ xxx) Gid: ( 513/ Aucun) Access: 2014-11-05 22:18:30.000000000 +0100 Modify: 2014-05-19 14:53:46.000000000 +0200 Change: 2014-05-19 14:53:46.000000000 +0200 Birth: 2014-06-14 17:28:06.960000000 +0200 stat of the destination file (exfat): File: '/cygdrive/f/backup_data/Dev_Gen/android/apps/apk/Adobe_Flash_Player_11.1.115.81.apk' Size: 4708736 Blocks: 4608 IO Block: 65536 regular file Device: e65d19c0h/3864861120d Inode: 2811054816192366358 Links: 1 Access: (0600/-rw-------) Uid: ( 1001/ xxx) Gid: ( 513/ Aucun) Access: 2015-01-06 16:59:02.000000000 +0100 Modify: 2014-05-19 14:53:46.000000000 +0200 Change: 2014-05-19 14:53:46.000000000 +0200 Birth: 2014-10-26 14:37:22.640000000 +0100 Just to be clear, I also have numerous "not malicious" files with a different blocks size value. To conclude, AFTER 'touch'ing the source file (ie to the current time), the always copy behavior of rsync stop after one rsync as it should be. I really don't know if this is a cygwin problem (which can not correctly convert time from FS to FS, or a buggy setting function) or an internal rsync problem or a bad interaction between the two (most likely probable to me, rounding time ?). Or perhaps I miss something; If someone can help me. regards, fabrice -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple