To my surprise and delight I was able to do this. I figured I should document it somewhere. It synthesizes a couple other answers I found to guide me but focuses on a case that I haven't seen addressed directly.
This is my situation: a couple years ago I replaced my home computer. My old computer was running Ubuntu 14. My new one is running Ubuntu 16. On the old computer, I was making regular backups to an external drive using backups/deja-dup/duplicity.
A couple days ago, the hard drive on my old computer (Ubuntu 14 one) died. I had copied over most the important stuff to my new computer (Ubuntu 16). However, there was a projects folder that still had some older projects that I hadn't gotten around to copying over. So I wanted to see if I could restore this folder from the backups on the external drive.
This is the path of the folder from my old computer I wanted to restore:
/home/klenwell/projects
This is the path of the folder on my external drive where the backups were being saved (after plugging external drive into new computer):
/media/klenwell/my-external-drive/u2014
I wanted to restore it to a folder at this path on my new computer:
/tmp/restored/u2014/projects
First, a quick refresher from question above on the key paths I'll be working with here:
/home/klenwell/projects
/media/klenwell/my-external-drive/u2014
/tmp/restored/u2014/projects
Command Line
From command line, here at the command I ran to restore the backup. See the next section for a step-by-step guide with explanation:
Step-By-Step Guide
Here's a break down of the commands below with explanations for each command:
Plug in external drive to new computer and confirm it's accessible:
Notes:
ksdfd987s-0sll1332-skd09233
.my-external-drive
and backups were in folderu2014
.Confirm I can see backed up files from older computer:
Notes:
sudo
to deal with this import error: https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.htmlfile://
prefix for my backups folder path.Back up
/home/klenwell/projects
on my new computer just to be safe in case duplicity tries to restore the backup folder to same path for some strange reason:Here's where the magic happens (it was a somewhat large directory so it took a few minutes in my case):
And to confirm all went well, I should now see my old project directory restored:
References