"Backup replaced files on restore" -> dir times wrong

Bug #1481053 reported by zsd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Back In Time
Confirmed
Medium
Unassigned

Bug Description

This happens on Slackware 14.1 YMMV.

When I have "Backup replaced files on restore" selected, rsync is called with --backup, which, on my system, automagically causes --omit-dir-times to be selected, which means the times on the directories are not restored. This is a Bad Thing.

My rsync man page comfirms this as intentional:
    Note that if you don’t specify --backup-dir, (1) the
              --omit-dir-times option will be implied,

At best, the use of the given backintime option violates the law of least astonishment, and, at worst, is a bug.
One work-around ("fix"?) would be to specify the --backup-dir, and another would be to have a third pass, after the files are copied and the directory permissions are updates, to change the directory times to the values in the snapshot. Probably there are other work-arounds/fixes.

In summary, it would be nice to have both "Backup replaced files on restore" and correct directory times.

Revision history for this message
Germar (germar) wrote :

Okay, but why is it important to restore correct mtime on directories? I'd totally understand if this was for files as rsync would sync them next time again. But different directory mtime doesn't add any extra space. They even don't trigger a new snapshot if there was nothing else changed.

Revision history for this message
zsd (zlists) wrote :

I often do something along the lines of
   ls -ltr
to see which things in a directory have been modified (most) recently. Having the wrong times on a restored directory provides misleading info, in that it looks like files have been added to or deleted from that dir more recently than in reality.

And I feel (as a matter of principle) that a backup system should restore all the meta-information possible.

Cheers.

Germar (germar)
Changed in backintime:
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.