As you may have guessed, duplicity
asks for a directory as the second argument when restoring files. According to man duplicity
:
duplicity [restore] [options] [--file-to-restore <relpath>] [--time time] source_url target_directory
...
If we wanted to restore just the file "Mail/article" in
/home/me
as it was three days ago into /home/me/restored_file
:
duplicity -t 3D --file-to-restore Mail/article
sftp://uid@other.host/some_dir /home/me/restored_file
So, in your case, you would use:
duplicity restore --no-encryption --file-to-restore hecatombe.txt "file:///media/TOSHIBA EXT/" "/home/rch/"
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.
Best Answer
Image of a partition
If the
image.dd
file is an image of a partition (or an iso file), you can easily loop mount it and read the files. Change directory to where you have the file and mount it.Image of a whole drive
If the
image.dd
file is an image of a whole drive (a HDD, SSD, pendrive, memory card), it is possible but more complicated to loop mount a partition. You may succeed withkpartx
.In this case it is probably easier to restore from the image file to a drive with at least the same size as the original drive from where it was cloned. Please notice that this drive will be overwritten, so all previous data on it will probably disappear.
You can do that with
dd
(simple but risky], or with mkusb, which 'wraps a safety belt arounddd
' by helping you identify the target drive and giving you a final checkpoint.In Windows there is Win32DiskImager that can also clone with a final checkpoint.
After restoring you can connect the drive,