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;
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
add a comment |
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
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
add a comment |
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
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
linux snapshot
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
add a comment |
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
add a comment |
5 Answers
5
active
oldest
votes
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 :-)
PS: If you expect something to go really wrong backup the partition table, likedd 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 togdisk
orfdisk
.
– Ned64
Aug 28 '15 at 19:35
add a comment |
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
That's quite short to be the best option for me. Of course if you don't haversync
you can usedd
wich i use to backup my usb drives.
– erm3nda
Jun 10 '16 at 1:36
add a comment |
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
add a comment |
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
add a comment |
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
New contributor
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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 :-)
PS: If you expect something to go really wrong backup the partition table, likedd 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 togdisk
orfdisk
.
– Ned64
Aug 28 '15 at 19:35
add a comment |
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 :-)
PS: If you expect something to go really wrong backup the partition table, likedd 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 togdisk
orfdisk
.
– Ned64
Aug 28 '15 at 19:35
add a comment |
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 :-)
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 :-)
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, likedd 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 togdisk
orfdisk
.
– Ned64
Aug 28 '15 at 19:35
add a comment |
PS: If you expect something to go really wrong backup the partition table, likedd 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 togdisk
orfdisk
.
– 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
add a comment |
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
That's quite short to be the best option for me. Of course if you don't haversync
you can usedd
wich i use to backup my usb drives.
– erm3nda
Jun 10 '16 at 1:36
add a comment |
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
That's quite short to be the best option for me. Of course if you don't haversync
you can usedd
wich i use to backup my usb drives.
– erm3nda
Jun 10 '16 at 1:36
add a comment |
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
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
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 haversync
you can usedd
wich i use to backup my usb drives.
– erm3nda
Jun 10 '16 at 1:36
add a comment |
That's quite short to be the best option for me. Of course if you don't haversync
you can usedd
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
add a comment |
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
add a comment |
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
add a comment |
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
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
edited Aug 28 '15 at 21:42
steve
14.3k22653
14.3k22653
answered Aug 28 '15 at 19:17
ventsyvventsyv
4342719
4342719
add a comment |
add a comment |
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
add a comment |
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
add a comment |
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
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
answered Aug 29 '15 at 1:02
Paulo AlmeidaPaulo Almeida
66634
66634
add a comment |
add a comment |
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
New contributor
add a comment |
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
New contributor
add a comment |
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
New contributor
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
New contributor
New contributor
answered Apr 11 at 1:50
user346623user346623
1
1
New contributor
New contributor
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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