[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] --listed-incremental ignores changed files when using file

From: Sergey Poznyakoff
Subject: Re: [Bug-tar] --listed-incremental ignores changed files when using filesystem snapshots
Date: Sun, 15 Nov 2009 18:17:00 +0200

Jean-Louis Martineau <address@hidden> ha escrit:

> It is a major bug for all users that use filesystem snapshot to make backup.

I did not argue whether this could be considered a bug or not. I only
described the way tar works.

> What is the reference timestamp stored in the snapshot file? Is it
>  - the time the backup started?
>  - the time when the file was put in the archive?
>  - the mtime of the file when it was put in the archive?

The first. It is documented in the Tar Manual, Appendix D.

Each file's mtime is compared with the time  the previous backup
was created. In the case reported by Bdale, the actual file's mtime
happens to be older than that, so it is not considered for the next

Let T be the time of mounting mnt-snap (line 26 of the script), in
seconds. Then, in this testcase, approximate mtimes of the `somefile'
before creating level-0 backup file will be:

  Backup creation time       T+4 
  ./mnt-snap/somefile mtime  T-1
  ./mnt/somefile mtime       T+3

At the time of level-1 backup, tar notices that somefile is one second
younger than the level-0 backup and therefore does not archive it.

> A file should be in the incremental if its mtime is newer than any of
> these.

Right. This would imply a major (or even complete) rewrite of the
incremental backup support. That's why I said that I could not propose
any immediate solution. FWIW, I can get to rewriting the incremental code
only after releasing version 1.23, which is scheduled to the end of



reply via email to

[Prev in Thread] Current Thread [Next in Thread]