[Gloucs] ext4 file modification times too precise

Anthony Edward Cooper aecooper at coosoft.plus.com
Wed Jun 30 08:59:42 UTC 2010


Looks like the latest dump/restore might work with ext4. But confronted 
with that situation I would simply select ext3 filesystems and let other 
people suffer the teething problems associated with a new filesystem 
type (which  there WILL be despite what people say). Filesystem code is 
non-trivial and critical - a bad combination... Anyway if you stick with 
ext4 - good luck.

Tony.

Andrew M.A. Cater wrote:
> On Tue, Jun 29, 2010 at 07:26:22PM +0100, Paul Broadhead wrote:
>   
>> Hi folks,
>>
>> I recently reinstalled Ubuntu 10.04 as I have a new computer:) The
>> machine is now using ext4 file systems where the old machine used ext3
>> and the same OS.
>>
>> I use a simple backup script which results in some tar.gz files being
>> copied to my server using a "cp -puvRf $source/* .", the important bit
>> is the -up options so that only changed files get copied, and copies
>> preserve the attributes of the original. The server, running Debian
>> 5.0.5, is exporting the destination file system which is using ext3.
>>
>> The problem is that it appears ext4 stores the modification time to a
>> larger precision than ext3, so for the copied files, the original
>> ext4 located file may have a stat modification time say:
>> Modify: 2010-06-27 07:57:27.622601087 +0100
>>
>> The copy on the ext3 file system has:
>> Modify: 2010-06-27 07:57:27.000000000 +0100
>>
>> This means that the -u part of the cp command thinks the original file
>> is always newer than the copy.  This means that each time by backup
>> runs, it copies over every file causing a lot of unnecessary network
>> traffic.
>>
>> So having failed with google, is there a way to fix this without
>> changing file systems? Possibly with mount or export options? I have
>> added a hack to the backup script to touch the original file with the
>> time stamp from the copy. This fixes the problem but it is a hack!
>> -- 
>>
>> Regards,
>> Paul
>>
>>
>> _______________________________________________
>> gloucs mailing list
>> gloucs at mailman.lug.org.uk
>> https://mailman.lug.org.uk/mailman/listinfo/gloucs
>>     
>
> Try rsync -pavz rather than using cp ?
>
> Andy
>
>
> _______________________________________________
> gloucs mailing list
> gloucs at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/gloucs
>   




More information about the gloucs mailing list