Restore file problem: Failed with an unknown error.

Bug #1950056 reported by tellapu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Duplicity
Invalid
Undecided
Unassigned
Déjà Dup
Invalid
Undecided
Unassigned

Bug Description

Today I tried to restore a file. It would not work and give following generic error:
Failed with an unknown error.
It can find the missing file, I can chose to restore it. It then creates a file with the same name but 0 bytes and a folder icon (instead of a picture).

I upgrade duplicity with the stable PPA:
https://code.launchpad.net/~duplicity-team/+archive/ubuntu/duplicity-release-git

I tried to restore with the command in the context file of Files/Nautilus "Restore missing file".
And from the command line with: deja-dup --restore file-to-path/file.txt

Both gave the same results as described above.

I use Ubuntu 20.04 LTS and 0.8.20-ppa202106261222~ubuntu20.10.1.

Do you need more information?
The setting is still fresh and I can retry to find more information.

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

I need a log file from deja-dup. Please run the restore like so:

$ DEJA_DUP_DEBUG=1 deja-dup --restore file-to-path/file.txt &> debug.log

Attach, do NOT copy/paste, debug.log to this bug report. See green button below.

Changed in duplicity:
status: New → Incomplete
Revision history for this message
tellapu (tellapu) wrote :

Thank you, Kenneth for the reply!

I have two problems to provide the "real" debug.log.

1. The path to the file contains spaces. I know it would be better all the folder names have no space and I have been working on it for the past 10 years but it is hard to replace them all one by one. (Or do you know a way to do it in one go?)
With which "letters" can I replace the space in the terminal command to be able to give the full path to the file?
As the same file is accessible through a symlink, I did the debug.log with this path which does not contain a space. Maybe it is still useful.

2. The log is 103.7 MB large and contains a lot of personal information with the folder paths it contains. Which part of the log do you need? Or is it possible to create a debug.log without all the folder-paths and file names?
The file I tried to restore is from the date of the fresh backup.
I deleted all the personal paths and replaced the name of the computer with "..." in some paths. Hopefully this is fine. Attached you find the cleaned log, maybe it is still useful.
The two lines for the missed file were the same as the others without any error.

I am looking forward to your feedback. I am eager to learn something.

Thanks a lot for your help!

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote : Re: [Bug 1950056] Re: Restore file problem: Failed with an unknown error.

OK, this is the wrong log file. It has 2 collection-status runs and 1
list-current-files, nothing about restore. I can't do anything with this
at all.

Did you update deja-dup at the same time? Try that.

Is the path to the file quoted? It should be if it contains spaces.

Can you run this without deja-dup, just as a duplicity command?

On Sun, Nov 7, 2021 at 12:45 PM tellapu <email address hidden> wrote:

> Thank you, Kenneth for the reply!
>
> I have two problems to provide the "real" debug.log.
>
> 1. The path to the file contains spaces. I know it would be better all the
> folder names have no space and I have been working on it for the past 10
> years but it is hard to replace them all one by one. (Or do you know a way
> to do it in one go?)
> With which "letters" can I replace the space in the terminal command to be
> able to give the full path to the file?
> As the same file is accessible through a symlink, I did the debug.log with
> this path which does not contain a space. Maybe it is still useful.
>
> 2. The log is 103.7 MB large and contains a lot of personal information
> with the folder paths it contains. Which part of the log do you need? Or is
> it possible to create a debug.log without all the folder-paths and file
> names?
> The file I tried to restore is from the date of the fresh backup.
> I deleted all the personal paths and replaced the name of the computer
> with "..." in some paths. Hopefully this is fine. Attached you find the
> cleaned log, maybe it is still useful.
> The two lines for the missed file were the same as the others without any
> error.
>
> I am looking forward to your feedback. I am eager to learn something.
>
> Thanks a lot for your help!
>
> ** Attachment added: "debug.log"
>
> https://bugs.launchpad.net/duplicity/+bug/1950056/+attachment/5538697/+files/debug.log
>
> --
> You received this bug notification because you are subscribed to
> Duplicity.
> https://bugs.launchpad.net/bugs/1950056
>
> Title:
> Restore file problem: Failed with an unknown error.
>
> Status in Duplicity:
> Incomplete
>
> Bug description:
> Today I tried to restore a file. It would not work and give following
> generic error:
> Failed with an unknown error.
> It can find the missing file, I can chose to restore it. It then creates
> a file with the same name but 0 bytes and a folder icon (instead of a
> picture).
>
> I upgrade duplicity with the stable PPA:
>
> https://code.launchpad.net/~duplicity-team/+archive/ubuntu/duplicity-release-git
>
> I tried to restore with the command in the context file of
> Files/Nautilus "Restore missing file".
> And from the command line with: deja-dup --restore file-to-path/file.txt
>
> Both gave the same results as described above.
>
> I use Ubuntu 20.04 LTS and 0.8.20-ppa202106261222~ubuntu20.10.1.
>
> Do you need more information?
> The setting is still fresh and I can retry to find more information.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/duplicity/+bug/1950056/+subscriptions
>
>

Revision history for this message
tellapu (tellapu) wrote (last edit ):

Thanks for the quick feedback!
Sorry I am just a regular user not a developer.

> OK, this is the wrong log file.

Sorry about that but this is the log file I get when execute this command in the terminal:
DEJA_DUP_DEBUG=1 deja-dup --restore file-to-path/file.txt &> debug.log

> Did you update deja-dup at the same time? Try that.

What do you mean with that? Update the backup? Update the app deja-dup through a PPA? If yes, which one? I updated duplicity with the PPA as mentioned above.

> Is the path to the file quoted? It should be if it contains spaces.

Thanks for the tip! I did following command:
DEJA_DUP_DEBUG=1 deja-dup --restore "file-to-path/file.txt" &> debug.log
And get the similar debug.log as sent previously.

> Can you run this without deja-dup, just as a duplicity command?

Do you mean:
DEJA_DUP_DEBUG=1 deja-dup --restore "file-to-path/file.txt" &> debug.log

I did this and the attached log is what was generated. It mentions:
"duplicity: error: Bad time string"
I just thought whether the time change from summer to winter time recently could cause a problem ... The backup was created before the change.
Update: But looking again at the error, the error is probably caused by the wrong command, a date might be needed in the command ...

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Sorry, did not mean to treat you like a developer. My bad.

Try this:

$ DEJA_DUP_DEBUG=1 deja-dup --restore "file\ to\ path/file.txt" &> debug.log

Leave the quotes and add a backslash '\' before each space.

Also, make sure that path-to-file starts the same as the backup.

If you get another error, zip the debug.log file and email it to <email address hidden>. That way you won't have to post something with private file names.

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Any progress?

Revision history for this message
tellapu (tellapu) wrote :

No problem regarding the developer language :).
Thanks for following up! I did not find time to work on this during this busy week.
I tried to do it with following equivalent command:
$ DEJA_DUP_DEBUG=1 deja-dup --restore "/home/XXXX/Pictures/Family/Miller\ John\ &\ Anna/Sunday-meeting/picture.JPG" &> debug.log

But it would not find the path to the picture.JPG. The folder's name (with the spaces) is "Miller John & Anna". Did I place the backslash correctly?

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Try putting a backslash before the '&' as well, like "John\ \&\ Anna"

Revision history for this message
tellapu (tellapu) wrote :

Thanks, the additional backslash helped! I got through the same windows and got the same error at the end.
But the log-file looks very similar to the one before.

I deleted all the personal paths and replaced the name of the computer with "..." in some paths.
All thousands of lines with the personal files looked the same, also the one with the file I try to restore. Here is a sample:
DUPLICITY: INFO 10 20210826T064753Z 'media/xxx/xxxx.mpeg' reg
DUPLICITY: . Thu Aug 26 08:47:53 2021 media/xxx/xxxx.mpeg

Does this help in any way?

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

@mike, I need some help. The OP has a problem with restoring via Deja Dup and cannot get a restore run to do debug log properly. He has supplied two debug logs and both have two collection-status and one list-current-files, but no restore portion. Is Deja Dup doing this or is this something else? What am I missing here?

Revision history for this message
Michael Terry (mterry) wrote :

Hello! I'm sorry Deja Dup isn't working for you tellupa.

Thanks Ken for trying to debug this so far - but based on what I'm seeing here, it's likely deja-dup's fault, not duplicity's.

The fact that the logs don't show an actual restore attempt makes me think Deja Dup is confusing itself before we even hand off to duplicity. The collection-status and list-current-files runs are both steps on the way to actually restoring.

I've got two suggestions:

1) Use duplicity directly. Based on the logs you provided, I'm guessing the following command would do it?

duplicity restore --no-encryption --file-to-restore=home/XXXX/Pictures/Family/Miller/John\ \&\ Anna/Sunday-meeting/picture.JPG file:///media/veracrypt1/dejadup-backup/Debuntu3Backup /tmp/picture.JPG

And hopefully the file is sitting at /tmp/picture.JPG

2) Update to the latest deja-dup. You can do this probably most easily by installing the snap version. Run:

snap install deja-dup --classic
sudo apt remove deja-dup

The reason this might help is that recent deja-dup versions have a browse & restore interface that might be easier than the command line and possibly there's a bug I fixed since the version you use?

Revision history for this message
tellapu (tellapu) wrote :

Thank you, Ken & Mike, for your help and suggestions!

In the meantime I could retrieve the file from an older full backup and therefore don't need to restore it through deja-dup anymore. But I am happy to provide any debugging info if this could be helpful.

Revision history for this message
tellapu (tellapu) wrote :

Hi Ken & Mike!
Listening to your silence ;), I assume you don't need more info for debugging. I anticipate a full backup will be required soon. When I don't hear soon something from you, I will rewrite the backup and can not do any debugging anymore.
Thanks again for your support!

Revision history for this message
Kenneth Loafman (kenneth-loafman) wrote :

Go ahead and do your backup. I suspect the info we needed for debugging was information you wanted to redact. Sorry we could not help any further. Thanks for your patience.

Changed in duplicity:
status: Incomplete → Invalid
Changed in deja-dup:
status: New → Invalid
Revision history for this message
tellapu (tellapu) wrote :

Thank you for your response! Much appreciated.
I don't think I deleted more valuable info as I deleted:
All thousands of lines with the personal files looked the same, also the one with the file I try to restore. Here is a sample:
DUPLICITY: INFO 10 20210826T064753Z 'media/xxx/xxxx.mpeg' reg
DUPLICITY: . Thu Aug 26 08:47:53 2021 media/xxx/xxxx.mpeg

But it could be that the bug has been fixed in a newer version.
Thanks for continuing to work on this!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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