Bug 2081983 - restored file date wrong
Summary: restored file date wrong
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: deja-dup
Version: 35
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-05 07:15 UTC by Marco
Modified: 2022-08-01 16:32 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-01 16:32:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marco 2022-05-05 07:15:18 UTC
Description of problem:
Trying to restore a full backup all files restored have the date of the restore and not the original date of the file

Version-Release number of selected component (if applicable):
42.8

How reproducible:
Restore from dejavu

Steps to Reproduce:
1. backup a dir 
2. restore from a previous backup
3. ls -lt and see de date field

Actual results:
date of restored files is the date of the restore 

Expected results:
restored files with their creation date when backuped 

Additional info:
On terminal with  duplicity you can correctly restore files - "duplicity restore --ssh-askpass --numeric-owner -t 1D --force file:///yourbackupdevice/backupdir /yourestoredir"

Comment 1 Gwyn Ciesla 2022-05-05 21:48:03 UTC
When did you first notice this?

Comment 2 Michael Terry 2022-05-09 22:11:19 UTC
I can reproduce, but only if I:

- Make the backup with $HOME as /home/XXX
- Restore the backup with $HOME as /home/YYY and choose "Restore files to original locations"

In that scenario (only one /home/ folder in backup and we are restoring to original locations, but our new HOME is different), Deja Dup has a feature where it translates the old home folder into your new home folder as we restore. During that translation, we must not be preserving timestamps.

I'll look into it.

(But please let me know if you reproduced this in a different way!)

Comment 3 Michael Terry 2022-05-09 23:17:05 UTC
After further testing, you don't even need the "original location" step - the issue is if the restored file has a different uid than the current user, in which case duplicity tries to fix it, fails, and then doesn't bother trying to fix up the permissions or the modified time in that case.

Since trying to fix the uid isn't important (probably not desirable even if we could, plus we basically never run with the permissions needed to call chmod), I've added an argument to duplicity to tell it not to bother doing this:

https://gitlab.gnome.org/World/deja-dup/-/compare/d24640c1...51d6f1a4

This will see the light of day in version 43.3 at some point.

Comment 4 Marco 2022-05-10 08:50:50 UTC
(In reply to Michael Terry from comment #2)
> I can reproduce, but only if I:
> 
> - Make the backup with $HOME as /home/XXX
> - Restore the backup with $HOME as /home/YYY and choose "Restore files to
> original locations"
> 
> In that scenario (only one /home/ folder in backup and we are restoring to
> original locations, but our new HOME is different), Deja Dup has a feature
> where it translates the old home folder into your new home folder as we
> restore. During that translation, we must not be preserving timestamps.
> 
> I'll look into it.
> 
> (But please let me know if you reproduced this in a different way!)

This is exatly the case. Thx


Note You need to log in before you can comment on or make changes to this bug.