rsync -a does not update file

I tried to update some file using rsync -a:

karl@hofkirchen:~> rsync -av /run/media/karl/WD25-BACKUP/backup/home/karl/Bilder/2008/2008-02-10/.jalbum/.info /home/karl/Bilder/2008/2008-02-10/.jalbum/.info
sending incremental file list

sent 56 bytes  received 12 bytes  136.00 bytes/sec
total size is 760  speedup is 11.18
karl@hofkirchen:~> diff -y /run/media/karl/WD25-BACKUP/backup/home/karl/Bilder/2008/2008-02-10/.jalbum/.info /home/karl/Bilder/2008/2008-02-10/.jalbum/.info
<?xml version="1.0" encoding="UTF-8"?>                          <?xml version="1.0" encoding="UTF-8"?>
<java version="1.7.0_51" class="java.beans.XMLDecoder">       | <java version="1.7.0_55" class="java.beans.XMLDecoder">
 <object class="java.util.HashMap">                              <object class="java.util.HashMap">
  <void method="put">                                             <void method="put">
   <string>lastFolderImageBlur</string>                            <string>lastFolderImageBlur</string>
   <boolean>false</boolean>                                        <boolean>false</boolean>
  </void>                                                         </void>
  <void method="put">                                             <void method="put">
   <string>title</string>                                          <string>title</string>
   <string>Thermen-Marathon</string>                               <string>Thermen-Marathon</string>
  </void>                                                         </void>
  <void method="put">                                             <void method="put">
   <string>lastFolderThumbSize</string>                            <string>lastFolderThumbSize</string>
   <string>300x300</string>                                        <string>300x300</string>
  </void>                                                         </void>
  <void method="put">                                             <void method="put">
   <string>hideLocation</string>                              <
   <boolean>false</boolean>                                   <
  </void>                                                     <
  <void method="put">                                         <
   <string>lastFolderImagePath</string>                            <string>lastFolderImagePath</string>
   <string>2008/2008-02-10/imgp0519.jpg</string>                   <string>2008/2008-02-10/imgp0519.jpg</string>
                                                              >   </void>
                                                              >   <void method="put">
                                                              >    <string>hideLocation</string>
                                                              >    <boolean>false</boolean>
  </void>                                                         </void>
  <void method="put">                                             <void method="put">
   <string>lastFolderImageSize</string>                            <string>lastFolderImageSize</string>
   <string>1200x240</string>                                       <string>1200x240</string>
  </void>                                                         </void>
 </object>                                                       </object>
</java>                                                         </java>
karl@hofkirchen:~> ls --full-time /run/media/karl/WD25-BACKUP/backup/home/karl/Bilder/2008/2008-02-10/.jalbum/.info /home/karl/Bilder/2008/2008-02-10/.jalbum/.info
-rw-r--r-- 1 karl users 760 2014-12-13 12:46:53.000000000 +0100 /home/karl/Bilder/2008/2008-02-10/.jalbum/.info
-rw-r--r-- 1 karl users 760 2014-12-13 12:46:53.721169118 +0100 /run/media/karl/WD25-BACKUP/backup/home/karl/Bilder/2008/2008-02-10/.jalbum/.info
karl@hofkirchen:~> 

Obviously files are still different. Time stamps are different and older version was not replaced by the newer one. Any thought?

On 2014-12-20 15:36, karlmistelberger wrote:

> Obviously files are still different. Time stamps are different and older
> version was not replaced by the newer one. Any thought?

Is that an external disk using FAT or NTFS? Granularity is 2 seconds, so
the timestamps are effectively the same. You could force to use
checksums instead.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

File system is ext4, so timestamps should differ.
Using rsync -ac would work, but is very slow.
I tried rsync -ca --exclude ‘*’ --include ‘.info’ , but this did not work.

On 2014-12-20 18:26, karlmistelberger wrote:
>
> robin_listas;2684167 Wrote:
>> Is that an external disk using FAT or NTFS? Granularity is 2 seconds, so
>> the timestamps are effectively the same. You could force to use
>> checksums instead.File system is ext4, so timestamps should differ.
> Using rsync-ac_ would work, but is very slow.

Yes, it is slow. You can not avoid it.

Notice that the difference in your timestamp is less than a second.

You did not answer my question: what filesystem are you using on your
backup disk?


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

The .info files fooling rsync are only a very tiny percentage of total volume transferred. I will continue to use rsync -a followed by find -name *.info -exec cp -a.

Notice that the difference in your timestamp is less than a second.
You did not answer my question: what filesystem are you using on your
backup disk?
My answer given already above is:

File system is ext4, so timestamps should differ.

From reading the man page I conclude that rsync -a (no checksums!) should copy the file, but it doesn’t.

On 2014-12-20 22:16, karlmistelberger wrote:
>
> robin_listas;2684237 Wrote:
>> Yes, it is slow. You can not avoid it.

> The .info files fooling rsync are only a very tiny percentage of total
> volume transferred. I will continue to use rsync-a_ followed by find
> -name *.info -exec cp -a.

Then search the man page for “pattern”:

+++—-—-—-—-—-—-—-—-—-—-—-—-—-—-—-


rsync -t *.c foo:src/

This would transfer all files matching the pattern *.c from the current
directory to the directory src on the machine foo. If any of the files
already exist on the remote system then the rsync remote-update protocol
is used to update the file by sending only the differences. See the
tech report for details.
—-—-—-—-—-—-—-—-—-—-—-—-—-—-—-+±

You could combine that with checksums, so that they are only calculated
for a certain pattern.

Or, instead, use “–ignore-times” for the pattern.

>> Notice that the difference in your timestamp is less than a second.
>> You did not answer my question: what filesystem are you using on your
>> backup disk?My answer given already above is:
>
> File system is ext4, so timestamps should differ.

Ok. Yes.

Try “–modify-window=0”. It should be the default, but maybe it is not.


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)