Backup and Restore a Debian system












0















I have buying me a little home server for backup my personal files like pictures and other files. This server runs booting from USB stick. I have setup the system with RAID 1 with mdadm to mirroring my files on two hard drives.



While I'm not advanced in Linux and I'm afraid of damaging something in my system I want to backup my root directory / to my hard drives /mnt/disk/public. This directory containing all my files from my hard drives.



Now my question:



I have found some snippet:



rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder


Would it be enough in my case to do a full backup with all permissions to simply backup and restore my server with all permissions and settings and exclude /mnt/disk/public to my disks in /mnt/disk/public?



Or is there a tool to do full system backups?










share|improve this question





























    0















    I have buying me a little home server for backup my personal files like pictures and other files. This server runs booting from USB stick. I have setup the system with RAID 1 with mdadm to mirroring my files on two hard drives.



    While I'm not advanced in Linux and I'm afraid of damaging something in my system I want to backup my root directory / to my hard drives /mnt/disk/public. This directory containing all my files from my hard drives.



    Now my question:



    I have found some snippet:



    rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder


    Would it be enough in my case to do a full backup with all permissions to simply backup and restore my server with all permissions and settings and exclude /mnt/disk/public to my disks in /mnt/disk/public?



    Or is there a tool to do full system backups?










    share|improve this question



























      0












      0








      0








      I have buying me a little home server for backup my personal files like pictures and other files. This server runs booting from USB stick. I have setup the system with RAID 1 with mdadm to mirroring my files on two hard drives.



      While I'm not advanced in Linux and I'm afraid of damaging something in my system I want to backup my root directory / to my hard drives /mnt/disk/public. This directory containing all my files from my hard drives.



      Now my question:



      I have found some snippet:



      rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder


      Would it be enough in my case to do a full backup with all permissions to simply backup and restore my server with all permissions and settings and exclude /mnt/disk/public to my disks in /mnt/disk/public?



      Or is there a tool to do full system backups?










      share|improve this question
















      I have buying me a little home server for backup my personal files like pictures and other files. This server runs booting from USB stick. I have setup the system with RAID 1 with mdadm to mirroring my files on two hard drives.



      While I'm not advanced in Linux and I'm afraid of damaging something in my system I want to backup my root directory / to my hard drives /mnt/disk/public. This directory containing all my files from my hard drives.



      Now my question:



      I have found some snippet:



      rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder


      Would it be enough in my case to do a full backup with all permissions to simply backup and restore my server with all permissions and settings and exclude /mnt/disk/public to my disks in /mnt/disk/public?



      Or is there a tool to do full system backups?







      debian rsync backup restore






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 7 '18 at 23:35









      Rui F Ribeiro

      40k1479135




      40k1479135










      asked Oct 1 '16 at 17:37









      fteinzfteinz

      16211




      16211






















          1 Answer
          1






          active

          oldest

          votes


















          0














          This will work, in that you will be backing up all of your data - and I recommend it to back up your data. I personally use this method to back up several full systems in small environments (as well as their variable data), and it works well.



          However, this is not some snapshot that you can simply revert to. If you have to use it to restore a system or copy one, you will have to build the partition structure and configure the boot system manually (as well as likely edit the fstab to match your new disk - plus a few other files I might be forgetting) before essentially reversing this command and restoring the contents of that filesystem.



          Now, there's nothing wrong with this. It's a bit manual, but certainly less manual than rebuilding an entire OS. Might take you two or three minutes if you're really used to it and don't run into issues (not counting the time it takes to copy things back, of course).



          That said, this is still a great way to backup your data even if you're using other methods to backup your full system, as you need to be able to get to that on a per-file basis, rather than a per-image basis. However, for system backups I find that a complete OS disk image - boot structures and all - is very convenient.



          For this kind of backup, I use ReaR (http://relax-and-recover.org/) in most small (<10 machines) environments. It's very simple to use, and easy to deploy. It will make an image of your machine that you can fall back on in a moment's notice, and even provides nice interactive shells to do so. It's great for leaving in place, as most people can walk up to it and use it.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            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: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            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%2funix.stackexchange.com%2fquestions%2f313681%2fbackup-and-restore-a-debian-system%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














            This will work, in that you will be backing up all of your data - and I recommend it to back up your data. I personally use this method to back up several full systems in small environments (as well as their variable data), and it works well.



            However, this is not some snapshot that you can simply revert to. If you have to use it to restore a system or copy one, you will have to build the partition structure and configure the boot system manually (as well as likely edit the fstab to match your new disk - plus a few other files I might be forgetting) before essentially reversing this command and restoring the contents of that filesystem.



            Now, there's nothing wrong with this. It's a bit manual, but certainly less manual than rebuilding an entire OS. Might take you two or three minutes if you're really used to it and don't run into issues (not counting the time it takes to copy things back, of course).



            That said, this is still a great way to backup your data even if you're using other methods to backup your full system, as you need to be able to get to that on a per-file basis, rather than a per-image basis. However, for system backups I find that a complete OS disk image - boot structures and all - is very convenient.



            For this kind of backup, I use ReaR (http://relax-and-recover.org/) in most small (<10 machines) environments. It's very simple to use, and easy to deploy. It will make an image of your machine that you can fall back on in a moment's notice, and even provides nice interactive shells to do so. It's great for leaving in place, as most people can walk up to it and use it.






            share|improve this answer




























              0














              This will work, in that you will be backing up all of your data - and I recommend it to back up your data. I personally use this method to back up several full systems in small environments (as well as their variable data), and it works well.



              However, this is not some snapshot that you can simply revert to. If you have to use it to restore a system or copy one, you will have to build the partition structure and configure the boot system manually (as well as likely edit the fstab to match your new disk - plus a few other files I might be forgetting) before essentially reversing this command and restoring the contents of that filesystem.



              Now, there's nothing wrong with this. It's a bit manual, but certainly less manual than rebuilding an entire OS. Might take you two or three minutes if you're really used to it and don't run into issues (not counting the time it takes to copy things back, of course).



              That said, this is still a great way to backup your data even if you're using other methods to backup your full system, as you need to be able to get to that on a per-file basis, rather than a per-image basis. However, for system backups I find that a complete OS disk image - boot structures and all - is very convenient.



              For this kind of backup, I use ReaR (http://relax-and-recover.org/) in most small (<10 machines) environments. It's very simple to use, and easy to deploy. It will make an image of your machine that you can fall back on in a moment's notice, and even provides nice interactive shells to do so. It's great for leaving in place, as most people can walk up to it and use it.






              share|improve this answer


























                0












                0








                0







                This will work, in that you will be backing up all of your data - and I recommend it to back up your data. I personally use this method to back up several full systems in small environments (as well as their variable data), and it works well.



                However, this is not some snapshot that you can simply revert to. If you have to use it to restore a system or copy one, you will have to build the partition structure and configure the boot system manually (as well as likely edit the fstab to match your new disk - plus a few other files I might be forgetting) before essentially reversing this command and restoring the contents of that filesystem.



                Now, there's nothing wrong with this. It's a bit manual, but certainly less manual than rebuilding an entire OS. Might take you two or three minutes if you're really used to it and don't run into issues (not counting the time it takes to copy things back, of course).



                That said, this is still a great way to backup your data even if you're using other methods to backup your full system, as you need to be able to get to that on a per-file basis, rather than a per-image basis. However, for system backups I find that a complete OS disk image - boot structures and all - is very convenient.



                For this kind of backup, I use ReaR (http://relax-and-recover.org/) in most small (<10 machines) environments. It's very simple to use, and easy to deploy. It will make an image of your machine that you can fall back on in a moment's notice, and even provides nice interactive shells to do so. It's great for leaving in place, as most people can walk up to it and use it.






                share|improve this answer













                This will work, in that you will be backing up all of your data - and I recommend it to back up your data. I personally use this method to back up several full systems in small environments (as well as their variable data), and it works well.



                However, this is not some snapshot that you can simply revert to. If you have to use it to restore a system or copy one, you will have to build the partition structure and configure the boot system manually (as well as likely edit the fstab to match your new disk - plus a few other files I might be forgetting) before essentially reversing this command and restoring the contents of that filesystem.



                Now, there's nothing wrong with this. It's a bit manual, but certainly less manual than rebuilding an entire OS. Might take you two or three minutes if you're really used to it and don't run into issues (not counting the time it takes to copy things back, of course).



                That said, this is still a great way to backup your data even if you're using other methods to backup your full system, as you need to be able to get to that on a per-file basis, rather than a per-image basis. However, for system backups I find that a complete OS disk image - boot structures and all - is very convenient.



                For this kind of backup, I use ReaR (http://relax-and-recover.org/) in most small (<10 machines) environments. It's very simple to use, and easy to deploy. It will make an image of your machine that you can fall back on in a moment's notice, and even provides nice interactive shells to do so. It's great for leaving in place, as most people can walk up to it and use it.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Oct 1 '16 at 18:51









                SpoolerSpooler

                1765




                1765






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • 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%2funix.stackexchange.com%2fquestions%2f313681%2fbackup-and-restore-a-debian-system%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

                    How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

                    is 'sed' thread safe

                    How to make a Squid Proxy server?