There was some discussion about rsync preserving atimes
 back in August last year that made the point that
 you have to choose between ctime and atime
 and ctime is often more important.

But I have a situation where the behaviour of
 the --backup and --checksum options
 is causing rsync to read files unnessessarily,
 loosing me atime info.

I have a (perl) script that snapshots a directory tree nightly using:

  # rsync -abc --delete --exclude '*~' 'source' 'archive'

This keeps the files up to date and retires versions to filename~
 when they fall out of currency.

The script extends this by then
 finding all files with bare ~ on the end
 and appending a datestamp like 2001~01~26~
It deletes copies based on MAXAGE and MAXCOPIES.

By backing up /etc this way on each of our servers
 I get an involuntary Configuration Version System.


But I find I need the -c flag or rsync will create a filename~
 whenever filename's mtime is touched, even if the contents are the same.

With the -c I find rsync reading (and checksumming?)
 all the files regardless of their mtime and size.
I would have expected to have to invoke -I to get this behaviour?

The behaviour I would like to be able to set up is:
 - pass over any files whose mtimes and size match (don't touch atime)
 - pass over any files whose checksums match       (yes, update atime)
 - backup only real contents change

Anybody know a way?
Any comments appreciated,
michaelj
-- 

Michael James       _/      _/      _/ _/     _/  v +61 2 6125 8318
Network Programmer _/_/     _/_/    _/ _/     _/
Coombs Computing  _/  _/    _/ _/   _/ _/     _/  f +61 2 6125 9767
 Australian      _/    _/   _/   _/ _/ _/     _/
  National      _/_/_/_/_/  _/    _/_/ _/     _/      michaelj@
   University  _/        _/ _/      _/  _/_/_/_/  coombs.anu.edu.au

Reply via email to