I'm trying to restore a single file with Deja-Dup but when I do this it starts scanning the ENTIRE frigging backup archive. Is there any way I can have it JUST restore the file I'm asking for without wasting an hour scanning every single file it can find.

4 Answers 4


Per manpage: http://manpages.ubuntu.com/manpages/natty/man1/deja-dup.1.html

SYNTAX: deja-dup --restore FILES
EXAMPLE: deja-dup --restore /usr/lib/cgi-bin/somefile.txt

This will restore the last known copy of this file. So if your last backup was on 5/15/2014, then only data up to 5/15/2014 will be present in somefile.txt . I've actually run this command myself and verified it works. NOTE* even though you're running it from command line, a gui window will popup asking for you to confirm the backup location and password, etc... Don't worry, it will only restore the file you specified at command line. Cheers


I don't have first hand experience with deja-dup, but according to Google it uses duplicity which in turn uses tar for its backup archives. It is the nature of tar that it does not support direct access to files but instead has to scan the archive until it comes across the desired file. There are alternative archive formats such as dar which provide direct file access. So if fast access to single files is a requirement for you, another backup solution might do a better job for you there.

  • 1
    Other solutions such as?
    – dswhite85
    May 28, 2013 at 23:41
  • 1
    Thanks, by now I've just restored the entire backup and copied over the files I need, but I will definitely use another solution from now on, even a manual backup would be better than this. I don't get why a backup system would disable itself so massively right out the gate.
    – Naatan
    May 30, 2013 at 14:26

To restore a single file, visit the folder where the file lives (or used to live). Right click on the file and select "Revert to Previous Version...." or right click in the directory (i.e. open the directory and right click someplace where there is no icon) and select "Restore missing files..."

This is more or less taken from Is there an easy way to get a single folder out of a Deja-Dup backup?

  • 1
    The OP knows how to do it, but states that the way Deja Dup handles it is very inefficient. Your answer does not take the actual question into account.
    – gertvdijk
    Jul 10, 2013 at 18:43
  • 1
    There's no such option Apr 26, 2014 at 4:27
  • 1
    There is no such option for me, either (Ubuntu 15.04)
    – CPBL
    Jul 28, 2015 at 19:33
  • I see the option for an existing modified file in Ubuntu 14.04 --- Although the answer may well be a slight off-topic with respect to the question request, it is useful for those who explore AU in search of capabilities to restore single files, and just land here Jul 6, 2017 at 6:42

Restoring a file after OS re-installation

Here is how you do it on Ubuntu Desktop (assuming you know the location and name of the file).

Case: Your OS was corrupted, you had performed a backup already before corruption, and now have to reinstall the Desktop OS Ubuntu and deja dup) to restore a file, some files, or the whole backup.

Note: this will only work if when reinstalling the fresh OS you used the same user as before, so if before your user had a home of /home/me, with the fresh install you also end up with the user me with home /home/me and also reuse the old password so they are no issues with permissions or ownerships.

How to do it:

Let's say your file was in the folder Documents and it was called myfile. With the new OS in place you create a dummy file on Documents also called myfile. (same location and name as the one inside the backup). Right click on the file and choose Revert to Previous Version... Point to the backup where the file exists, and depending on how many backups of the file there are, you will be given the option to choose by date a version. And yes, there will be scanning of the backup or backups involved, but if the file exists you will presented with it. I have restored files this way. As long the dummy file you use has the same name and extension and is in the exact same location as file you want to restore, this procedure will work. Case sensitive as well.

By the way, a way to avoid having so many versions of backups is to once in a while delete all backups and do a fresh backup. I do this every six months or so. Just delete all files inside the your backup folder and do a fresh one. Less space used, less time to find what you are looking for...

I know this works, because I had to figure this out after a couple of hard drive failures over the years. With this procedure you can actually restore the whole backup to newly fresh OS installation, but nowadays I just restore a few files needed, because the whole backup also restores unwanted old OS settings files. The whole point of a fresh installation is to start with fresh settings.

  • Hello. I have no idea if your answer will work as it just one very long continuous sentence that is very hard to read. Suggest you format it.
    – David
    Mar 26 at 11:57
  • @David Feel free to suggest an edit :) Apr 2 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.