Restoring full backup to Ubuntu Server with rsync












1














First a little background: Last weekend I set up RAID 5 with new disks I got for my homelab server. Because I set up raid for the first time it would delete all of my data. With this in mind before I set up RAID, I made an rsync backup of my entire Ubuntu server system using this command:



sudo rsync -aAXv / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*", "/mnt/*","/media/*",”/ssh/*”,"/lost+found"} /mnt


Everything backed up fine so I went ahead, set up RAID, and then did a fresh install of Ubuntu Server. I then plugged the drive in, mounted it and ran this command to restore the backup:



sudo rsync -aAXv /home/mnt/* /


After running this command it showed all of my files restoring to the server. However on reboot the monitor showed a selection menu and I hit "ubuntu". Some words showed on screen saying that I needed to load the kernel first. I believe this happened because the backup must have some unique identifier that overwrote the one on the fresh Ubuntu install, stopping the server from booting. I already reinstalled Ubuntu again as I think maybe I need to exclude something from the restore of the backup when I try it again. I'm pretty new to Linux so I'm hoping someone here can help. Thanks in advance.










share|improve this question









New contributor




Drew Sauer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    1














    First a little background: Last weekend I set up RAID 5 with new disks I got for my homelab server. Because I set up raid for the first time it would delete all of my data. With this in mind before I set up RAID, I made an rsync backup of my entire Ubuntu server system using this command:



    sudo rsync -aAXv / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*", "/mnt/*","/media/*",”/ssh/*”,"/lost+found"} /mnt


    Everything backed up fine so I went ahead, set up RAID, and then did a fresh install of Ubuntu Server. I then plugged the drive in, mounted it and ran this command to restore the backup:



    sudo rsync -aAXv /home/mnt/* /


    After running this command it showed all of my files restoring to the server. However on reboot the monitor showed a selection menu and I hit "ubuntu". Some words showed on screen saying that I needed to load the kernel first. I believe this happened because the backup must have some unique identifier that overwrote the one on the fresh Ubuntu install, stopping the server from booting. I already reinstalled Ubuntu again as I think maybe I need to exclude something from the restore of the backup when I try it again. I'm pretty new to Linux so I'm hoping someone here can help. Thanks in advance.










    share|improve this question









    New contributor




    Drew Sauer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1







      First a little background: Last weekend I set up RAID 5 with new disks I got for my homelab server. Because I set up raid for the first time it would delete all of my data. With this in mind before I set up RAID, I made an rsync backup of my entire Ubuntu server system using this command:



      sudo rsync -aAXv / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*", "/mnt/*","/media/*",”/ssh/*”,"/lost+found"} /mnt


      Everything backed up fine so I went ahead, set up RAID, and then did a fresh install of Ubuntu Server. I then plugged the drive in, mounted it and ran this command to restore the backup:



      sudo rsync -aAXv /home/mnt/* /


      After running this command it showed all of my files restoring to the server. However on reboot the monitor showed a selection menu and I hit "ubuntu". Some words showed on screen saying that I needed to load the kernel first. I believe this happened because the backup must have some unique identifier that overwrote the one on the fresh Ubuntu install, stopping the server from booting. I already reinstalled Ubuntu again as I think maybe I need to exclude something from the restore of the backup when I try it again. I'm pretty new to Linux so I'm hoping someone here can help. Thanks in advance.










      share|improve this question









      New contributor




      Drew Sauer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      First a little background: Last weekend I set up RAID 5 with new disks I got for my homelab server. Because I set up raid for the first time it would delete all of my data. With this in mind before I set up RAID, I made an rsync backup of my entire Ubuntu server system using this command:



      sudo rsync -aAXv / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*", "/mnt/*","/media/*",”/ssh/*”,"/lost+found"} /mnt


      Everything backed up fine so I went ahead, set up RAID, and then did a fresh install of Ubuntu Server. I then plugged the drive in, mounted it and ran this command to restore the backup:



      sudo rsync -aAXv /home/mnt/* /


      After running this command it showed all of my files restoring to the server. However on reboot the monitor showed a selection menu and I hit "ubuntu". Some words showed on screen saying that I needed to load the kernel first. I believe this happened because the backup must have some unique identifier that overwrote the one on the fresh Ubuntu install, stopping the server from booting. I already reinstalled Ubuntu again as I think maybe I need to exclude something from the restore of the backup when I try it again. I'm pretty new to Linux so I'm hoping someone here can help. Thanks in advance.







      server backup rsync






      share|improve this question









      New contributor




      Drew Sauer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      Drew Sauer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited Jan 3 at 6:25









      Zanna

      50.2k13133241




      50.2k13133241






      New contributor




      Drew Sauer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked Jan 3 at 2:13









      Drew Sauer

      82




      82




      New contributor




      Drew Sauer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Drew Sauer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Drew Sauer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          1 Answer
          1






          active

          oldest

          votes


















          1














          If you restored /etc, then you over-wrote /etc/fstab, and this will prevent your system from booting, because it points to the partitions on the system's hard drives.



          There are numerous questions on this site about how to fix fstab from a live session. Or you could just not restore it, if you reinstalled already.






          share|improve this answer





















            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
            });


            }
            });






            Drew Sauer is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1106454%2frestoring-full-backup-to-ubuntu-server-with-rsync%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









            1














            If you restored /etc, then you over-wrote /etc/fstab, and this will prevent your system from booting, because it points to the partitions on the system's hard drives.



            There are numerous questions on this site about how to fix fstab from a live session. Or you could just not restore it, if you reinstalled already.






            share|improve this answer


























              1














              If you restored /etc, then you over-wrote /etc/fstab, and this will prevent your system from booting, because it points to the partitions on the system's hard drives.



              There are numerous questions on this site about how to fix fstab from a live session. Or you could just not restore it, if you reinstalled already.






              share|improve this answer
























                1












                1








                1






                If you restored /etc, then you over-wrote /etc/fstab, and this will prevent your system from booting, because it points to the partitions on the system's hard drives.



                There are numerous questions on this site about how to fix fstab from a live session. Or you could just not restore it, if you reinstalled already.






                share|improve this answer












                If you restored /etc, then you over-wrote /etc/fstab, and this will prevent your system from booting, because it points to the partitions on the system's hard drives.



                There are numerous questions on this site about how to fix fstab from a live session. Or you could just not restore it, if you reinstalled already.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 3 at 4:41









                Organic Marble

                10.7k63358




                10.7k63358






















                    Drew Sauer is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    Drew Sauer is a new contributor. Be nice, and check out our Code of Conduct.













                    Drew Sauer is a new contributor. Be nice, and check out our Code of Conduct.












                    Drew Sauer is a new contributor. Be nice, and check out our Code of Conduct.
















                    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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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%2f1106454%2frestoring-full-backup-to-ubuntu-server-with-rsync%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

                    數位音樂下載

                    When can things happen in Etherscan, such as the picture below?

                    格利澤436b