Ubuntu – Restore individual folders from full backup using duplicity/deja


I have done a fresh install of Ubuntu 18.04 (Bionic Beaver). I would like to selectively restore some folders from a backup performed using duplicity on Ubuntu 12.04 to avoid overriding my home folder. The backup is stored on an external drive. Two questions would follow.

First question, is there a way to a extract a single folder instead of the full backup restore using the Deja/Dup GUI? The answer provided in Is it possible to restore only one directory with the backup utility? is outdated and would not work for fresh installs.

Restoring the entire backup to a different folder and then copying individual folders, as stated in Can I restore a backup on a different computer than it was made?, would not be convenient due to storage issues.

Second Question, is there another GUI programs alternative for duplicity other than Deja/Dup that can do that? Otherwise, the way to go is following the steps in the following link: https://wiki.gnome.org/Apps/DejaDup/Help/Restore/WorstCase#Restoring_by_Hand


Best Answer

The old method of restoring via right-click in Nautilus should work. The only time that option is not available in the context menu is when you are in a folder that is not included in the current backup settings. On your fresh install, make sure you have configured the backup exactly like on the old install.

A little technical background: Nautilus doesn't check what backups currently exist on the system. In fact, doing so would take a long time and cannot be done everytime you right-click on a folder. It only checks which folders are scheduled for backup and shows the option whenever you are in such a folder.

(Also, it seems like it doesn't check for exclusion filters – even in excluded folders, the restore option is available if the parent folder is included. Deja-dup won't restore anything though if you actually click it.)

If you still don't succeed on your machine for whatever reason, you can use this method instead:

deja-dup --restore [File1 File2 ...]

will restore individual files if you know their names.

deja-dup --restore-missing [Directory]

will restore the files that have been deleted from the given directory.

Note that both of these commands will bring up the Deja-Dup Restore GUI, which will also allow you to specify the backup source. You don't need to do the whole task on the command line.

Related Question