Creating a snapshot of a linux system Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionIs it possible to save hibernation state in linux?Restricting / disabling linux disk buffering in a virtual machineUninstalling programs in LinuxLinux file system corruption due to improper shutdown (fs ext4)?Linux stuck at boot: A start job is running forRevert to snapshot at bootHow to keep my system clean?Does my Linux system support the 32-bit syscall table?Host system crashes when running a virtual machineAre file edits in Linux directly saved into disk?Have systemd not kill your service if it is in a state it should not be killed

Can a zero nonce be safely used with AES-GCM if the key is random and never used again?

How do I automatically answer y in bash script?

How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time

No baking right

Is it possible to ask for a hotel room without minibar/extra services?

How do I keep my slimes from escaping their pens?

Determine whether f is a function, an injection, a surjection

Biased dice probability question

Need a suitable toxic chemical for a murder plot in my novel

Antler Helmet: Can it work?

Can smartphones with the same camera sensor have different image quality?

How do you clear the ApexPages.getMessages() collection in a test?

Did the new image of black hole confirm the general theory of relativity?

Why is there no army of Iron-Mans in the MCU?

Estimate capacitor parameters

Why is "Captain Marvel" translated as male in Portugal?

Autumning in love

What was the last x86 CPU that did not have the x87 floating-point unit built in?

Active filter with series inductor and resistor - do these exist?

Who can trigger ship-wide alerts in Star Trek?

Why use gamma over alpha radiation?

What loss function to use when labels are probabilities?

Mortgage adviser recommends a longer term than necessary combined with overpayments

How to market an anarchic city as a tourism spot to people living in civilized areas?



Creating a snapshot of a linux system



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionIs it possible to save hibernation state in linux?Restricting / disabling linux disk buffering in a virtual machineUninstalling programs in LinuxLinux file system corruption due to improper shutdown (fs ext4)?Linux stuck at boot: A start job is running forRevert to snapshot at bootHow to keep my system clean?Does my Linux system support the 32-bit syscall table?Host system crashes when running a virtual machineAre file edits in Linux directly saved into disk?Have systemd not kill your service if it is in a state it should not be killed



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








11















I want to do the following - Save the current state of my linux OS(centOS6.5). Do some changes (more specifically inject a fault and test some service to check how it behaves when that particular type of a fault occurs.) Then restore the system back to the saved state. I am not able to figure out how to do this on a linux system. I have a machine with centOS 6.5 with an ext4 filesystem.Also this is a physical server and not a virtual machine.



Any ideas or suggestions?










share|improve this question
























  • Physical server, or virtual machine ?

    – steve
    Aug 28 '15 at 18:33






  • 1





    I recommend to run your OS on virtualization software like VirtualBox. It nicely supports snapshots.

    – yaegashi
    Aug 28 '15 at 18:34











  • It is a physical server. I need to do this on multiple machines(physical servers) and cannot change the configuration to run my OS on a virtualization software.

    – bRuta
    Aug 28 '15 at 18:39











  • It usually needs an additional meta layer like virtualization to support system snapshots. It would be very hard to make physical servers behave themselves as if they were under control of it from firmware and bootloader level.

    – yaegashi
    Aug 28 '15 at 19:14

















11















I want to do the following - Save the current state of my linux OS(centOS6.5). Do some changes (more specifically inject a fault and test some service to check how it behaves when that particular type of a fault occurs.) Then restore the system back to the saved state. I am not able to figure out how to do this on a linux system. I have a machine with centOS 6.5 with an ext4 filesystem.Also this is a physical server and not a virtual machine.



Any ideas or suggestions?










share|improve this question
























  • Physical server, or virtual machine ?

    – steve
    Aug 28 '15 at 18:33






  • 1





    I recommend to run your OS on virtualization software like VirtualBox. It nicely supports snapshots.

    – yaegashi
    Aug 28 '15 at 18:34











  • It is a physical server. I need to do this on multiple machines(physical servers) and cannot change the configuration to run my OS on a virtualization software.

    – bRuta
    Aug 28 '15 at 18:39











  • It usually needs an additional meta layer like virtualization to support system snapshots. It would be very hard to make physical servers behave themselves as if they were under control of it from firmware and bootloader level.

    – yaegashi
    Aug 28 '15 at 19:14













11












11








11


2






I want to do the following - Save the current state of my linux OS(centOS6.5). Do some changes (more specifically inject a fault and test some service to check how it behaves when that particular type of a fault occurs.) Then restore the system back to the saved state. I am not able to figure out how to do this on a linux system. I have a machine with centOS 6.5 with an ext4 filesystem.Also this is a physical server and not a virtual machine.



Any ideas or suggestions?










share|improve this question
















I want to do the following - Save the current state of my linux OS(centOS6.5). Do some changes (more specifically inject a fault and test some service to check how it behaves when that particular type of a fault occurs.) Then restore the system back to the saved state. I am not able to figure out how to do this on a linux system. I have a machine with centOS 6.5 with an ext4 filesystem.Also this is a physical server and not a virtual machine.



Any ideas or suggestions?







linux snapshot






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 28 '15 at 18:55







bRuta

















asked Aug 28 '15 at 18:25









bRutabRuta

131226




131226












  • Physical server, or virtual machine ?

    – steve
    Aug 28 '15 at 18:33






  • 1





    I recommend to run your OS on virtualization software like VirtualBox. It nicely supports snapshots.

    – yaegashi
    Aug 28 '15 at 18:34











  • It is a physical server. I need to do this on multiple machines(physical servers) and cannot change the configuration to run my OS on a virtualization software.

    – bRuta
    Aug 28 '15 at 18:39











  • It usually needs an additional meta layer like virtualization to support system snapshots. It would be very hard to make physical servers behave themselves as if they were under control of it from firmware and bootloader level.

    – yaegashi
    Aug 28 '15 at 19:14

















  • Physical server, or virtual machine ?

    – steve
    Aug 28 '15 at 18:33






  • 1





    I recommend to run your OS on virtualization software like VirtualBox. It nicely supports snapshots.

    – yaegashi
    Aug 28 '15 at 18:34











  • It is a physical server. I need to do this on multiple machines(physical servers) and cannot change the configuration to run my OS on a virtualization software.

    – bRuta
    Aug 28 '15 at 18:39











  • It usually needs an additional meta layer like virtualization to support system snapshots. It would be very hard to make physical servers behave themselves as if they were under control of it from firmware and bootloader level.

    – yaegashi
    Aug 28 '15 at 19:14
















Physical server, or virtual machine ?

– steve
Aug 28 '15 at 18:33





Physical server, or virtual machine ?

– steve
Aug 28 '15 at 18:33




1




1





I recommend to run your OS on virtualization software like VirtualBox. It nicely supports snapshots.

– yaegashi
Aug 28 '15 at 18:34





I recommend to run your OS on virtualization software like VirtualBox. It nicely supports snapshots.

– yaegashi
Aug 28 '15 at 18:34













It is a physical server. I need to do this on multiple machines(physical servers) and cannot change the configuration to run my OS on a virtualization software.

– bRuta
Aug 28 '15 at 18:39





It is a physical server. I need to do this on multiple machines(physical servers) and cannot change the configuration to run my OS on a virtualization software.

– bRuta
Aug 28 '15 at 18:39













It usually needs an additional meta layer like virtualization to support system snapshots. It would be very hard to make physical servers behave themselves as if they were under control of it from firmware and bootloader level.

– yaegashi
Aug 28 '15 at 19:14





It usually needs an additional meta layer like virtualization to support system snapshots. It would be very hard to make physical servers behave themselves as if they were under control of it from firmware and bootloader level.

– yaegashi
Aug 28 '15 at 19:14










5 Answers
5






active

oldest

votes


















8














I would keep it simple and clone it. Boot a live system from USB (easiest is Ubuntu from a USB thumb drive, I find), then dump your hard disk to a different partition (or external hard drive etc.), e.g.



dd if=/dev/sda1 bs=64M of=/mnt/my_mounted_backup_drive/backup-sda1


where you need to replace /dev/sda1 with your root (/) partition. Do the same with other partitions (like the one for /boot, /boot/efi, /home) where applicable.



If you need to save space, you could do



dd if=/dev/sda1 bs=64M | gzip --fast | dd bs=32M of=/mnt/my_mounted_backup_drive/backup-sda1.gz


or, more complicated, much slower but saving a few more bytes,



mkdir -p /mnt/linux
mount -o ro /dev/sda1 /mnt/linux
cd /mnt/linux
tar cvJf /mnt/my_mounted_backup_drive/linux-backup.tar.xz .??* *


You can then restore the other way around, e.g.



mkdir -p /mnt/linux
mount /dev/sda1 /mnt/linux
cd /mnt/linux
tar xvJf /mnt/my_mounted_backup_drive/linux-backup.tar.xz


or



dd /mnt/my_mounted_backup_drive/backup-sda1.gz bs=32M | gzip --decompress | dd bs=64M of=/dev/sda1


(careful where you are writing your data, this deletes everything on /dev/sda1, so get it right the first time :-)






share|improve this answer

























  • PS: If you expect something to go really wrong backup the partition table, like dd if=/dev/sda bs=64M count=2 of=/mnt/my_mounted_backup_drive/backup-sda. When restoring you need to be careful not to write too many blocks back to disk here - cannot say how many without looking at your partition layout. Restore up to (not including) the block where your first partition starts according to gdisk or fdisk.

    – Ned64
    Aug 28 '15 at 19:35


















5














You can use rsync to backup the entire system.



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


There's a awesome article at Arch Linux Wiki about it






share|improve this answer























  • That's quite short to be the best option for me. Of course if you don't have rsync you can use dd wich i use to backup my usb drives.

    – erm3nda
    Jun 10 '16 at 1:36


















3














How about using rsync or rsnapshot to essentially backup the local machine? Once you test is done, simply restore the backup.



http://rsnapshot.org/



http://www.mikerubel.org/computers/rsync_snapshots/



Similarly, you can use LVM:



http://www.tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html






share|improve this answer
































    1














    You can use FSArchiver, which will save the contents of the file system to a compressed file and restore the filesystem when extracting the data.



    Here is an example from the documentation:



    fsarchiver savefs /mnt/backup/gentoo-rootfs.fsa /dev/sda1


    You can also use multi-threaded compression, and restoring is straightforward:



    fsarchiver restfs /mnt/backup/gentoo-rootfs.fsa id=0,dest=/dev/sda1





    share|improve this answer






























      -1














      In order to go back to a previous state, you could mount the current file system to a new directory. This mounts the file system to a new root directory specified by the following command:



      mount DIR DIR



      To restore this state, change the root of the file system from the directory specified in the mount command.



      umount DIR






      share|improve this answer








      New contributor




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




















        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%2f226144%2fcreating-a-snapshot-of-a-linux-system%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        5 Answers
        5






        active

        oldest

        votes








        5 Answers
        5






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        8














        I would keep it simple and clone it. Boot a live system from USB (easiest is Ubuntu from a USB thumb drive, I find), then dump your hard disk to a different partition (or external hard drive etc.), e.g.



        dd if=/dev/sda1 bs=64M of=/mnt/my_mounted_backup_drive/backup-sda1


        where you need to replace /dev/sda1 with your root (/) partition. Do the same with other partitions (like the one for /boot, /boot/efi, /home) where applicable.



        If you need to save space, you could do



        dd if=/dev/sda1 bs=64M | gzip --fast | dd bs=32M of=/mnt/my_mounted_backup_drive/backup-sda1.gz


        or, more complicated, much slower but saving a few more bytes,



        mkdir -p /mnt/linux
        mount -o ro /dev/sda1 /mnt/linux
        cd /mnt/linux
        tar cvJf /mnt/my_mounted_backup_drive/linux-backup.tar.xz .??* *


        You can then restore the other way around, e.g.



        mkdir -p /mnt/linux
        mount /dev/sda1 /mnt/linux
        cd /mnt/linux
        tar xvJf /mnt/my_mounted_backup_drive/linux-backup.tar.xz


        or



        dd /mnt/my_mounted_backup_drive/backup-sda1.gz bs=32M | gzip --decompress | dd bs=64M of=/dev/sda1


        (careful where you are writing your data, this deletes everything on /dev/sda1, so get it right the first time :-)






        share|improve this answer

























        • PS: If you expect something to go really wrong backup the partition table, like dd if=/dev/sda bs=64M count=2 of=/mnt/my_mounted_backup_drive/backup-sda. When restoring you need to be careful not to write too many blocks back to disk here - cannot say how many without looking at your partition layout. Restore up to (not including) the block where your first partition starts according to gdisk or fdisk.

          – Ned64
          Aug 28 '15 at 19:35















        8














        I would keep it simple and clone it. Boot a live system from USB (easiest is Ubuntu from a USB thumb drive, I find), then dump your hard disk to a different partition (or external hard drive etc.), e.g.



        dd if=/dev/sda1 bs=64M of=/mnt/my_mounted_backup_drive/backup-sda1


        where you need to replace /dev/sda1 with your root (/) partition. Do the same with other partitions (like the one for /boot, /boot/efi, /home) where applicable.



        If you need to save space, you could do



        dd if=/dev/sda1 bs=64M | gzip --fast | dd bs=32M of=/mnt/my_mounted_backup_drive/backup-sda1.gz


        or, more complicated, much slower but saving a few more bytes,



        mkdir -p /mnt/linux
        mount -o ro /dev/sda1 /mnt/linux
        cd /mnt/linux
        tar cvJf /mnt/my_mounted_backup_drive/linux-backup.tar.xz .??* *


        You can then restore the other way around, e.g.



        mkdir -p /mnt/linux
        mount /dev/sda1 /mnt/linux
        cd /mnt/linux
        tar xvJf /mnt/my_mounted_backup_drive/linux-backup.tar.xz


        or



        dd /mnt/my_mounted_backup_drive/backup-sda1.gz bs=32M | gzip --decompress | dd bs=64M of=/dev/sda1


        (careful where you are writing your data, this deletes everything on /dev/sda1, so get it right the first time :-)






        share|improve this answer

























        • PS: If you expect something to go really wrong backup the partition table, like dd if=/dev/sda bs=64M count=2 of=/mnt/my_mounted_backup_drive/backup-sda. When restoring you need to be careful not to write too many blocks back to disk here - cannot say how many without looking at your partition layout. Restore up to (not including) the block where your first partition starts according to gdisk or fdisk.

          – Ned64
          Aug 28 '15 at 19:35













        8












        8








        8







        I would keep it simple and clone it. Boot a live system from USB (easiest is Ubuntu from a USB thumb drive, I find), then dump your hard disk to a different partition (or external hard drive etc.), e.g.



        dd if=/dev/sda1 bs=64M of=/mnt/my_mounted_backup_drive/backup-sda1


        where you need to replace /dev/sda1 with your root (/) partition. Do the same with other partitions (like the one for /boot, /boot/efi, /home) where applicable.



        If you need to save space, you could do



        dd if=/dev/sda1 bs=64M | gzip --fast | dd bs=32M of=/mnt/my_mounted_backup_drive/backup-sda1.gz


        or, more complicated, much slower but saving a few more bytes,



        mkdir -p /mnt/linux
        mount -o ro /dev/sda1 /mnt/linux
        cd /mnt/linux
        tar cvJf /mnt/my_mounted_backup_drive/linux-backup.tar.xz .??* *


        You can then restore the other way around, e.g.



        mkdir -p /mnt/linux
        mount /dev/sda1 /mnt/linux
        cd /mnt/linux
        tar xvJf /mnt/my_mounted_backup_drive/linux-backup.tar.xz


        or



        dd /mnt/my_mounted_backup_drive/backup-sda1.gz bs=32M | gzip --decompress | dd bs=64M of=/dev/sda1


        (careful where you are writing your data, this deletes everything on /dev/sda1, so get it right the first time :-)






        share|improve this answer















        I would keep it simple and clone it. Boot a live system from USB (easiest is Ubuntu from a USB thumb drive, I find), then dump your hard disk to a different partition (or external hard drive etc.), e.g.



        dd if=/dev/sda1 bs=64M of=/mnt/my_mounted_backup_drive/backup-sda1


        where you need to replace /dev/sda1 with your root (/) partition. Do the same with other partitions (like the one for /boot, /boot/efi, /home) where applicable.



        If you need to save space, you could do



        dd if=/dev/sda1 bs=64M | gzip --fast | dd bs=32M of=/mnt/my_mounted_backup_drive/backup-sda1.gz


        or, more complicated, much slower but saving a few more bytes,



        mkdir -p /mnt/linux
        mount -o ro /dev/sda1 /mnt/linux
        cd /mnt/linux
        tar cvJf /mnt/my_mounted_backup_drive/linux-backup.tar.xz .??* *


        You can then restore the other way around, e.g.



        mkdir -p /mnt/linux
        mount /dev/sda1 /mnt/linux
        cd /mnt/linux
        tar xvJf /mnt/my_mounted_backup_drive/linux-backup.tar.xz


        or



        dd /mnt/my_mounted_backup_drive/backup-sda1.gz bs=32M | gzip --decompress | dd bs=64M of=/dev/sda1


        (careful where you are writing your data, this deletes everything on /dev/sda1, so get it right the first time :-)







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Aug 28 '15 at 19:38

























        answered Aug 28 '15 at 19:32









        Ned64Ned64

        2,64911338




        2,64911338












        • PS: If you expect something to go really wrong backup the partition table, like dd if=/dev/sda bs=64M count=2 of=/mnt/my_mounted_backup_drive/backup-sda. When restoring you need to be careful not to write too many blocks back to disk here - cannot say how many without looking at your partition layout. Restore up to (not including) the block where your first partition starts according to gdisk or fdisk.

          – Ned64
          Aug 28 '15 at 19:35

















        • PS: If you expect something to go really wrong backup the partition table, like dd if=/dev/sda bs=64M count=2 of=/mnt/my_mounted_backup_drive/backup-sda. When restoring you need to be careful not to write too many blocks back to disk here - cannot say how many without looking at your partition layout. Restore up to (not including) the block where your first partition starts according to gdisk or fdisk.

          – Ned64
          Aug 28 '15 at 19:35
















        PS: If you expect something to go really wrong backup the partition table, like dd if=/dev/sda bs=64M count=2 of=/mnt/my_mounted_backup_drive/backup-sda. When restoring you need to be careful not to write too many blocks back to disk here - cannot say how many without looking at your partition layout. Restore up to (not including) the block where your first partition starts according to gdisk or fdisk.

        – Ned64
        Aug 28 '15 at 19:35





        PS: If you expect something to go really wrong backup the partition table, like dd if=/dev/sda bs=64M count=2 of=/mnt/my_mounted_backup_drive/backup-sda. When restoring you need to be careful not to write too many blocks back to disk here - cannot say how many without looking at your partition layout. Restore up to (not including) the block where your first partition starts according to gdisk or fdisk.

        – Ned64
        Aug 28 '15 at 19:35













        5














        You can use rsync to backup the entire system.



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


        There's a awesome article at Arch Linux Wiki about it






        share|improve this answer























        • That's quite short to be the best option for me. Of course if you don't have rsync you can use dd wich i use to backup my usb drives.

          – erm3nda
          Jun 10 '16 at 1:36















        5














        You can use rsync to backup the entire system.



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


        There's a awesome article at Arch Linux Wiki about it






        share|improve this answer























        • That's quite short to be the best option for me. Of course if you don't have rsync you can use dd wich i use to backup my usb drives.

          – erm3nda
          Jun 10 '16 at 1:36













        5












        5








        5







        You can use rsync to backup the entire system.



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


        There's a awesome article at Arch Linux Wiki about it






        share|improve this answer













        You can use rsync to backup the entire system.



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


        There's a awesome article at Arch Linux Wiki about it







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 28 '15 at 21:01









        Hugo RodriguesHugo Rodrigues

        848




        848












        • That's quite short to be the best option for me. Of course if you don't have rsync you can use dd wich i use to backup my usb drives.

          – erm3nda
          Jun 10 '16 at 1:36

















        • That's quite short to be the best option for me. Of course if you don't have rsync you can use dd wich i use to backup my usb drives.

          – erm3nda
          Jun 10 '16 at 1:36
















        That's quite short to be the best option for me. Of course if you don't have rsync you can use dd wich i use to backup my usb drives.

        – erm3nda
        Jun 10 '16 at 1:36





        That's quite short to be the best option for me. Of course if you don't have rsync you can use dd wich i use to backup my usb drives.

        – erm3nda
        Jun 10 '16 at 1:36











        3














        How about using rsync or rsnapshot to essentially backup the local machine? Once you test is done, simply restore the backup.



        http://rsnapshot.org/



        http://www.mikerubel.org/computers/rsync_snapshots/



        Similarly, you can use LVM:



        http://www.tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html






        share|improve this answer





























          3














          How about using rsync or rsnapshot to essentially backup the local machine? Once you test is done, simply restore the backup.



          http://rsnapshot.org/



          http://www.mikerubel.org/computers/rsync_snapshots/



          Similarly, you can use LVM:



          http://www.tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html






          share|improve this answer



























            3












            3








            3







            How about using rsync or rsnapshot to essentially backup the local machine? Once you test is done, simply restore the backup.



            http://rsnapshot.org/



            http://www.mikerubel.org/computers/rsync_snapshots/



            Similarly, you can use LVM:



            http://www.tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html






            share|improve this answer















            How about using rsync or rsnapshot to essentially backup the local machine? Once you test is done, simply restore the backup.



            http://rsnapshot.org/



            http://www.mikerubel.org/computers/rsync_snapshots/



            Similarly, you can use LVM:



            http://www.tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 28 '15 at 21:42









            steve

            14.3k22653




            14.3k22653










            answered Aug 28 '15 at 19:17









            ventsyvventsyv

            4342719




            4342719





















                1














                You can use FSArchiver, which will save the contents of the file system to a compressed file and restore the filesystem when extracting the data.



                Here is an example from the documentation:



                fsarchiver savefs /mnt/backup/gentoo-rootfs.fsa /dev/sda1


                You can also use multi-threaded compression, and restoring is straightforward:



                fsarchiver restfs /mnt/backup/gentoo-rootfs.fsa id=0,dest=/dev/sda1





                share|improve this answer



























                  1














                  You can use FSArchiver, which will save the contents of the file system to a compressed file and restore the filesystem when extracting the data.



                  Here is an example from the documentation:



                  fsarchiver savefs /mnt/backup/gentoo-rootfs.fsa /dev/sda1


                  You can also use multi-threaded compression, and restoring is straightforward:



                  fsarchiver restfs /mnt/backup/gentoo-rootfs.fsa id=0,dest=/dev/sda1





                  share|improve this answer

























                    1












                    1








                    1







                    You can use FSArchiver, which will save the contents of the file system to a compressed file and restore the filesystem when extracting the data.



                    Here is an example from the documentation:



                    fsarchiver savefs /mnt/backup/gentoo-rootfs.fsa /dev/sda1


                    You can also use multi-threaded compression, and restoring is straightforward:



                    fsarchiver restfs /mnt/backup/gentoo-rootfs.fsa id=0,dest=/dev/sda1





                    share|improve this answer













                    You can use FSArchiver, which will save the contents of the file system to a compressed file and restore the filesystem when extracting the data.



                    Here is an example from the documentation:



                    fsarchiver savefs /mnt/backup/gentoo-rootfs.fsa /dev/sda1


                    You can also use multi-threaded compression, and restoring is straightforward:



                    fsarchiver restfs /mnt/backup/gentoo-rootfs.fsa id=0,dest=/dev/sda1






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Aug 29 '15 at 1:02









                    Paulo AlmeidaPaulo Almeida

                    66634




                    66634





















                        -1














                        In order to go back to a previous state, you could mount the current file system to a new directory. This mounts the file system to a new root directory specified by the following command:



                        mount DIR DIR



                        To restore this state, change the root of the file system from the directory specified in the mount command.



                        umount DIR






                        share|improve this answer








                        New contributor




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
























                          -1














                          In order to go back to a previous state, you could mount the current file system to a new directory. This mounts the file system to a new root directory specified by the following command:



                          mount DIR DIR



                          To restore this state, change the root of the file system from the directory specified in the mount command.



                          umount DIR






                          share|improve this answer








                          New contributor




                          user346623 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







                            In order to go back to a previous state, you could mount the current file system to a new directory. This mounts the file system to a new root directory specified by the following command:



                            mount DIR DIR



                            To restore this state, change the root of the file system from the directory specified in the mount command.



                            umount DIR






                            share|improve this answer








                            New contributor




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










                            In order to go back to a previous state, you could mount the current file system to a new directory. This mounts the file system to a new root directory specified by the following command:



                            mount DIR DIR



                            To restore this state, change the root of the file system from the directory specified in the mount command.



                            umount DIR







                            share|improve this answer








                            New contributor




                            user346623 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 answer



                            share|improve this answer






                            New contributor




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









                            answered Apr 11 at 1:50









                            user346623user346623

                            1




                            1




                            New contributor




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





                            New contributor





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






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



























                                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%2f226144%2fcreating-a-snapshot-of-a-linux-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

                                getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

                                Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

                                Marilyn Monroe Ny fiainany manokana | Jereo koa | Meny fitetezanafanitarana azy.