Jon LaBadie wrote:
The mtime + the inode number are compared by gnutar.
Paul,
I haven't looked at the code, but wouldn't it use ctime rather than mtime?
If a file has had its permissions or ownership changed that file should
also be a candidate for backing up so that restoration is accurate.
Yes you're right (but I'm too, a little):
Having a closer look in the code
File "incremen.c"
395 if (0 < getline (&buf, &bufsize, fp))
... (read the first line from the file, error checking etc)
400 unsigned long u = (errno = 0, strtoul (buf, &ebuf, 10));
... (convert to long int, and some more error checking)
409 newer_mtime_option = t;
OK, now the "newer_mtime_option" is initialized from the
integer on the first line in the file.
Then:
299 else
300 if (children == CHANGED_CHILDREN
301 && stat_data.st_mtime < newer_mtime_option
302 && (!after_date_option
303 || stat_data.st_ctime < newer_ctime_option))
304 add_to_accumulator (accumulator, "N", 1);
305 else
306 add_to_accumulator (accumulator, "Y", 1);
And indeed it is compared to mtime!!!
I could not find the point where newer_ctime_option was initialised.
BUT, a closer look after receiving your mail revealed:
in common.h:
#define newer_ctime_option newer_mtime_option
So gnutar compares both ctime and mtime of each file to the same
timestamp.
--
Paul Bijnens, Xplanation Tel +32 16 397.511
Technologielaan 21 bus 2, B-3001 Leuven, BELGIUM Fax +32 16 397.512
http://www.xplanation.com/ email: Paul.Bijnens AT xplanation DOT com
***********************************************************************
* I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, F6, *
* quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, *
* stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt, abort, hangup, *
* PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e, kill -1 $$, shutdown, *
* kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ... *
* ... "Are you sure?" ... YES ... Phew ... I'm out *
***********************************************************************
|