Skip to content

Preserve imported timestamps and attribution for file objects#2954

Open
stevelr wants to merge 1 commit intoanyproto:developfrom
stevelr:fix/file-dates-006
Open

Preserve imported timestamps and attribution for file objects#2954
stevelr wants to merge 1 commit intoanyproto:developfrom
stevelr:fix/file-dates-006

Conversation

@stevelr
Copy link
Copy Markdown
Contributor

@stevelr stevelr commented Feb 16, 2026

  • I understand that contributing to this repository will require me to agree with the CLA

Description

During protobuf restore/import, file-object metadata indexing was overwriting snapshot-provided dates (CreatedDate, LastModifiedDate, AddedDate) with filesystem-derived timestamps from temp files.

Three associated fixes:

  • Pass date and identity keys from import snapshots through to file object creation (oldfile.go)
  • Set ChangeTypeHistoryOperation and OriginalCreatedTimestamp during creation to prevent the apply layer from overwriting timestamps (service.go)
  • Restore import-provided dates and identity keys after metadata merge in the indexer (fileindex.go)

What type of PR is this? (check all applicable)

  • 🐛 Bug Fix
  • ✅ Test

Related Tickets & Documents

Fixes #2951

Added tests?

  • 👍 yes

During protobuf restore/import, file-object metadata indexing was
overwriting snapshot-provided dates (CreatedDate, LastModifiedDate,
AddedDate) with filesystem-derived timestamps from temp files.

Three associated fixes:
- Pass date and identity keys from import snapshots through to file
  object creation (oldfile.go)
- Set ChangeTypeHistoryOperation and OriginalCreatedTimestamp during
  creation to prevent the apply layer from overwriting timestamps
  (service.go)
- Restore import-provided dates and identity keys after metadata
  merge in the indexer (fileindex.go)
@stevelr
Copy link
Copy Markdown
Contributor Author

stevelr commented Feb 16, 2026

ref: anyback test p1_restore_non_archived_image_between_spaces_preserves_fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

restore/import of file objects does not preserve createdDate and lastModifiedDate

1 participant