Skip to content

Timestamps randomly not restored #4969

@akrabu

Description

@akrabu

Output of restic version

restic 0.17.0 compiled with go1.22.5 on darwin/arm64
(also occurs on v0.16.5)

What backend/service did you use to store the repository?

Local

Problem description / Steps to reproduce

Restored a large snapshot, random files had the date modified set to the date of the restore. Restored that specific folder only - it still did not restore the timestamps on the same files.

Expected behavior

Restore metadata accurately

Actual behavior

Files are restored intact, but randomly missing metadata, including timestamps. Timestamps will have the current restore date.

Do you have any idea what may have caused this?

Uncertain. Here's the debug log filtered for an affected file:

8108:2024/08/01 12:47:05 restorer/restorer.go:209	restorer.(*Restorer).traverseTreeInner	1	SelectFilter returned true true for "/zicam letter.doc"
8109:2024/08/01 12:47:05 restorer/restorer.go:373	restorer.(*Restorer).RestoreTo.func2	1	first pass, visitNode: mkdir "/zicam letter.doc", leaveDir on second pass should restore metadata
32757:2024/08/01 12:47:12 restorer/restorer.go:209	restorer.(*Restorer).traverseTreeInner	1	SelectFilter returned true true for "/zicam letter.doc"
32758:2024/08/01 12:47:12 restorer/restorer.go:430	restorer.(*Restorer).RestoreTo.func3	1	second pass, visitNode: restore node "/zicam letter.doc"
32759:2024/08/01 12:47:12 restorer/restorer.go:289	restorer.(*Restorer).restoreNodeMetadataTo	1	restoreNodeMetadata zicam letter.doc /Users/copenhav/_RESTORED/test/zicam letter.doc /zicam letter.doc
37768:2024/08/01 12:47:13 restorer/restorer.go:209	restorer.(*Restorer).traverseTreeInner	88	SelectFilter returned true true for "/zicam letter.doc"

There is a good chance this is due to special characters in the filename. There are many special symbols, such as "fancy" dashes and apostrophes that seem to choke 'tar' and 'ditto' both, while testing.

After some experimentation, I found that any folder having a locked file (uchg flag) seems to have dates restored incorrectly, including within subfolders - but not the subfolder itself. So that would be a good place to check first!

Screenshot 2024-08-01 at 5 39 49 PM
Screenshot 2024-08-01 at 5 41 22 PM

Did restic help you today? Did it make you happy in any way?

🫶

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions