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.
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.
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?
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.