How can I restore a folder backed up on my old computer running Ubuntu to my new one?Is it possible to...

What was this official D&D 3.5e Lovecraft-flavored rulebook?

How can "mimic phobia" be cured or prevented?

Has any country ever had 2 former presidents in jail simultaneously?

What should you do if you miss a job interview (deliberately)?

Is it better practice to read straight from sheet music rather than memorize it?

Problem with TransformedDistribution

Count the occurrence of each unique word in the file

What does routing an IP address mean?

Why electric field inside a cavity of a non-conducting sphere not zero?

Are the IPv6 address space and IPv4 address space completely disjoint?

2.8 Why are collections grayed out? How can I open them?

Travelling outside the UK without a passport

What if a revenant (monster) gains fire resistance?

Can I sign legal documents with a smiley face?

If infinitesimal transformations commute why dont the generators of the Lorentz group commute?

When were female captains banned from Starfleet?

Is this toilet slogan correct usage of the English language?

What is this cable/device?

Offered money to buy a house, seller is asking for more to cover gap between their listing and mortgage owed

Longest common substring in linear time

Creepy dinosaur pc game identification

Start making guitar arrangements

Lowest total scrabble score

How should I respond when I lied about my education and the company finds out through background check?



How can I restore a folder backed up on my old computer running Ubuntu to my new one?


Is it possible to restore only one directory with the backup utility?How do I move my encrypted /home to a new computer?Are there any known issues with Deja-Dup and Ubuntu One; notebly on restore?Why does my deja dup restore run out of space?deja dup backup restore has failed meI can't locate a folder in my duplicity backupHow do I restore a backup from Duplicityduplicity restore failed - urgent help pleaseHow to correctly restore directory backed up with duplicitySSD failure and Deja-Dup failureCannot restore directory with accurate date control with nautilus and deja-dup













0















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









share



























    0















    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









    share

























      0












      0








      0








      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









      share














      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







      backup deja-dup duplicity





      share












      share










      share



      share










      asked 7 mins ago









      klenwellklenwell

      1,49431925




      1,49431925






















          1 Answer
          1






          active

          oldest

          votes


















          0














          First, a quick refresher from question above on the key paths I'll be working with here:




          • Folder from old dead computer I want to restore: /home/klenwell/projects

          • Folder of old computer backups on external drive (when plugged into new computer): /media/klenwell/my-external-drive/u2014

          • Folder on new computer where I want restore folder: /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:



          # backup new project directory (to be safe)
          mkdir /tmp/new-projects-backup
          cp -R ~/projects /tmp/new-projects-backup

          # review list of backed up paths from old computer
          sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
          less /tmp/u2014-backup-list.txt

          # make destination folder for restored directory
          mkdir /tmp/restored/u2014/projects

          # restore backup
          sudo duplicity restore
          --file-to-restore home/klenwell/projects
          file:///media/klenwell/my-external-drive/u2014
          /tmp/restored/u2014/projects

          # confirm folder has been restored
          ls -al /tmp/restored/u2014/projects


          Step-By-Step Guide



          Here's a break down of the commands below with explanations for each command:





          1. Plug in external drive to new computer and confirm it's accessible:



            ls -al /media/klenwell


            Notes:




            • In reality, the mounted external drive's directory name a random string like ksdfd987s-0sll1332-skd09233.

            • To simplify this guide, I will assume it was named my-external-drive and backups were in folder u2014.




          2. Confirm I can see backed up files from older computer:



            sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
            less /tmp/u2014-backup-list.txt


            Notes:




            • I needed to use sudo to deal with this import error: https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html

            • I needed to know the password I used to encrypt backups on my old computer meaning I entered 2 password: my sudo password and my backups password.

            • Note the file:// prefix for my backups folder path.

            • It took a few minutes to generate the output file.




          3. 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:



            mkdir /tmp/new-projects-backup
            cp -R ~/projects /tmp/new-projects-backup



          4. Here's where the magic happens (it was a somewhat large directory so it took a few minutes in my case):



            sudo duplicity restore 
            --file-to-restore home/klenwell/projects
            file:///media/klenwell/my-external-drive/u2014
            /tmp/restored/u2014/projects



          5. And to confirm all went well, I should now see my old project directory restored:



            ls -al /tmp/restored/u2014/projects



          References




          • https://askubuntu.com/a/332914

          • https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html





          share























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128178%2fhow-can-i-restore-a-folder-backed-up-on-my-old-computer-running-ubuntu-to-my-new%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            First, a quick refresher from question above on the key paths I'll be working with here:




            • Folder from old dead computer I want to restore: /home/klenwell/projects

            • Folder of old computer backups on external drive (when plugged into new computer): /media/klenwell/my-external-drive/u2014

            • Folder on new computer where I want restore folder: /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:



            # backup new project directory (to be safe)
            mkdir /tmp/new-projects-backup
            cp -R ~/projects /tmp/new-projects-backup

            # review list of backed up paths from old computer
            sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
            less /tmp/u2014-backup-list.txt

            # make destination folder for restored directory
            mkdir /tmp/restored/u2014/projects

            # restore backup
            sudo duplicity restore
            --file-to-restore home/klenwell/projects
            file:///media/klenwell/my-external-drive/u2014
            /tmp/restored/u2014/projects

            # confirm folder has been restored
            ls -al /tmp/restored/u2014/projects


            Step-By-Step Guide



            Here's a break down of the commands below with explanations for each command:





            1. Plug in external drive to new computer and confirm it's accessible:



              ls -al /media/klenwell


              Notes:




              • In reality, the mounted external drive's directory name a random string like ksdfd987s-0sll1332-skd09233.

              • To simplify this guide, I will assume it was named my-external-drive and backups were in folder u2014.




            2. Confirm I can see backed up files from older computer:



              sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
              less /tmp/u2014-backup-list.txt


              Notes:




              • I needed to use sudo to deal with this import error: https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html

              • I needed to know the password I used to encrypt backups on my old computer meaning I entered 2 password: my sudo password and my backups password.

              • Note the file:// prefix for my backups folder path.

              • It took a few minutes to generate the output file.




            3. 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:



              mkdir /tmp/new-projects-backup
              cp -R ~/projects /tmp/new-projects-backup



            4. Here's where the magic happens (it was a somewhat large directory so it took a few minutes in my case):



              sudo duplicity restore 
              --file-to-restore home/klenwell/projects
              file:///media/klenwell/my-external-drive/u2014
              /tmp/restored/u2014/projects



            5. And to confirm all went well, I should now see my old project directory restored:



              ls -al /tmp/restored/u2014/projects



            References




            • https://askubuntu.com/a/332914

            • https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html





            share




























              0














              First, a quick refresher from question above on the key paths I'll be working with here:




              • Folder from old dead computer I want to restore: /home/klenwell/projects

              • Folder of old computer backups on external drive (when plugged into new computer): /media/klenwell/my-external-drive/u2014

              • Folder on new computer where I want restore folder: /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:



              # backup new project directory (to be safe)
              mkdir /tmp/new-projects-backup
              cp -R ~/projects /tmp/new-projects-backup

              # review list of backed up paths from old computer
              sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
              less /tmp/u2014-backup-list.txt

              # make destination folder for restored directory
              mkdir /tmp/restored/u2014/projects

              # restore backup
              sudo duplicity restore
              --file-to-restore home/klenwell/projects
              file:///media/klenwell/my-external-drive/u2014
              /tmp/restored/u2014/projects

              # confirm folder has been restored
              ls -al /tmp/restored/u2014/projects


              Step-By-Step Guide



              Here's a break down of the commands below with explanations for each command:





              1. Plug in external drive to new computer and confirm it's accessible:



                ls -al /media/klenwell


                Notes:




                • In reality, the mounted external drive's directory name a random string like ksdfd987s-0sll1332-skd09233.

                • To simplify this guide, I will assume it was named my-external-drive and backups were in folder u2014.




              2. Confirm I can see backed up files from older computer:



                sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
                less /tmp/u2014-backup-list.txt


                Notes:




                • I needed to use sudo to deal with this import error: https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html

                • I needed to know the password I used to encrypt backups on my old computer meaning I entered 2 password: my sudo password and my backups password.

                • Note the file:// prefix for my backups folder path.

                • It took a few minutes to generate the output file.




              3. 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:



                mkdir /tmp/new-projects-backup
                cp -R ~/projects /tmp/new-projects-backup



              4. Here's where the magic happens (it was a somewhat large directory so it took a few minutes in my case):



                sudo duplicity restore 
                --file-to-restore home/klenwell/projects
                file:///media/klenwell/my-external-drive/u2014
                /tmp/restored/u2014/projects



              5. And to confirm all went well, I should now see my old project directory restored:



                ls -al /tmp/restored/u2014/projects



              References




              • https://askubuntu.com/a/332914

              • https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html





              share


























                0












                0








                0







                First, a quick refresher from question above on the key paths I'll be working with here:




                • Folder from old dead computer I want to restore: /home/klenwell/projects

                • Folder of old computer backups on external drive (when plugged into new computer): /media/klenwell/my-external-drive/u2014

                • Folder on new computer where I want restore folder: /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:



                # backup new project directory (to be safe)
                mkdir /tmp/new-projects-backup
                cp -R ~/projects /tmp/new-projects-backup

                # review list of backed up paths from old computer
                sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
                less /tmp/u2014-backup-list.txt

                # make destination folder for restored directory
                mkdir /tmp/restored/u2014/projects

                # restore backup
                sudo duplicity restore
                --file-to-restore home/klenwell/projects
                file:///media/klenwell/my-external-drive/u2014
                /tmp/restored/u2014/projects

                # confirm folder has been restored
                ls -al /tmp/restored/u2014/projects


                Step-By-Step Guide



                Here's a break down of the commands below with explanations for each command:





                1. Plug in external drive to new computer and confirm it's accessible:



                  ls -al /media/klenwell


                  Notes:




                  • In reality, the mounted external drive's directory name a random string like ksdfd987s-0sll1332-skd09233.

                  • To simplify this guide, I will assume it was named my-external-drive and backups were in folder u2014.




                2. Confirm I can see backed up files from older computer:



                  sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
                  less /tmp/u2014-backup-list.txt


                  Notes:




                  • I needed to use sudo to deal with this import error: https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html

                  • I needed to know the password I used to encrypt backups on my old computer meaning I entered 2 password: my sudo password and my backups password.

                  • Note the file:// prefix for my backups folder path.

                  • It took a few minutes to generate the output file.




                3. 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:



                  mkdir /tmp/new-projects-backup
                  cp -R ~/projects /tmp/new-projects-backup



                4. Here's where the magic happens (it was a somewhat large directory so it took a few minutes in my case):



                  sudo duplicity restore 
                  --file-to-restore home/klenwell/projects
                  file:///media/klenwell/my-external-drive/u2014
                  /tmp/restored/u2014/projects



                5. And to confirm all went well, I should now see my old project directory restored:



                  ls -al /tmp/restored/u2014/projects



                References




                • https://askubuntu.com/a/332914

                • https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html





                share













                First, a quick refresher from question above on the key paths I'll be working with here:




                • Folder from old dead computer I want to restore: /home/klenwell/projects

                • Folder of old computer backups on external drive (when plugged into new computer): /media/klenwell/my-external-drive/u2014

                • Folder on new computer where I want restore folder: /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:



                # backup new project directory (to be safe)
                mkdir /tmp/new-projects-backup
                cp -R ~/projects /tmp/new-projects-backup

                # review list of backed up paths from old computer
                sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
                less /tmp/u2014-backup-list.txt

                # make destination folder for restored directory
                mkdir /tmp/restored/u2014/projects

                # restore backup
                sudo duplicity restore
                --file-to-restore home/klenwell/projects
                file:///media/klenwell/my-external-drive/u2014
                /tmp/restored/u2014/projects

                # confirm folder has been restored
                ls -al /tmp/restored/u2014/projects


                Step-By-Step Guide



                Here's a break down of the commands below with explanations for each command:





                1. Plug in external drive to new computer and confirm it's accessible:



                  ls -al /media/klenwell


                  Notes:




                  • In reality, the mounted external drive's directory name a random string like ksdfd987s-0sll1332-skd09233.

                  • To simplify this guide, I will assume it was named my-external-drive and backups were in folder u2014.




                2. Confirm I can see backed up files from older computer:



                  sudo duplicity list-current-files file:///media/klenwell/my-external-drive/u2014 > /tmp/u2014-backup-list.txt
                  less /tmp/u2014-backup-list.txt


                  Notes:




                  • I needed to use sudo to deal with this import error: https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html

                  • I needed to know the password I used to encrypt backups on my old computer meaning I entered 2 password: my sudo password and my backups password.

                  • Note the file:// prefix for my backups folder path.

                  • It took a few minutes to generate the output file.




                3. 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:



                  mkdir /tmp/new-projects-backup
                  cp -R ~/projects /tmp/new-projects-backup



                4. Here's where the magic happens (it was a somewhat large directory so it took a few minutes in my case):



                  sudo duplicity restore 
                  --file-to-restore home/klenwell/projects
                  file:///media/klenwell/my-external-drive/u2014
                  /tmp/restored/u2014/projects



                5. And to confirm all went well, I should now see my old project directory restored:



                  ls -al /tmp/restored/u2014/projects



                References




                • https://askubuntu.com/a/332914

                • https://lists.nongnu.org/archive/html/duplicity-talk/2013-10/msg00002.html






                share











                share


                share










                answered 7 mins ago









                klenwellklenwell

                1,49431925




                1,49431925






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1128178%2fhow-can-i-restore-a-folder-backed-up-on-my-old-computer-running-ubuntu-to-my-new%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

                    Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

                    Should I use Docker or LXD?How to cache (more) data on SSD/RAM to avoid spin up?Unable to get Windows File...