home | list info | list archive | date index | thread index

Re: rsync to backup phone

On Sat, Mar 27, 2021 at 12:23:25PM -0400, James wrote:
> It copies every file, not just the new files.

Try this:

$ man rsync
[...]
   -@, --modify-window=NUM     set the accuracy for mod-time comparisons

      When  comparing  two  timestamps, rsync treats the timestamps as
      being equal if they differ by no  more  than  the  modify-window
      value.   The  default  is 0, which matches just integer seconds.
      If you specify a negative value (and the receiver  is  at  least
      version 3.1.3) then nanoseconds will also be taken into account.
      Specifying 1  is  useful  for  copies  to/from  MS  Windows  FAT
      filesystems,  because FAT represents times with a 2-second reso‐
      lution (allowing times to differ from the original by  up  to  1
      second).

      If  you want all your transfers to default to comparing nanosec‐
      onds, you can create a ~/.popt file and put these lines in it:

      rsync alias -a -a@-1
      rsync alias -t -t@-1

      With that as the default, you’d need  to  specify  --modify-win‐
      dow=0  (aka  -@0) to override it and ignore nanoseconds, e.g. if
      you’re copying between ext3 and ext4, or if the receiving  rsync
      is older than 3.1.3.

-- 
| Ian! D. Allen, BA, MMath  -  idallen [ at ] idallen [ dot ] ca - Ottawa, Ontario, Canada
| Home: www.idallen.com   Contact Improvisation Dance: www.contactimprov.ca
| Former college professor (Free/Libre GNU+Linux) at:  teaching.idallen.com
| Defend digital freedom:  http://eff.org/  and have fun:  http://fools.ca/

To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org
To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org
To visit the archives: https://lists.linux-ottawa.org

references

message navigation