backintime icon indicating copy to clipboard operation
backintime copied to clipboard

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

Open Germar opened this issue 10 years ago • 2 comments

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.


Imported from Launchpad using lp2gh.

  • date created: 2015-08-03T18:57:10Z
  • owner: zlists
  • the launchpad url was https://bugs.launchpad.net/bugs/1481053

Germar avatar Oct 11 '15 16:10 Germar

(by germar) 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.

Germar avatar Oct 11 '15 19:10 Germar

(by zlists) 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 avatar Oct 11 '15 19:10 Germar

Closing as duplicate of #1007.

emtiu avatar Sep 26 '22 21:09 emtiu