3

I need a whole-system snapshot( both system state and disk ) on Linux.

I know that there are several ways to take disk snapshot such as lvm2, zfs, or Btrfs. However, I could not look for any whole-system snapshot (cpu, memory, and disk state) anywhere. Is there any way to do that? I mean the way like system snapshot feature on VM.

Marc Kim
  • 31
  • 2
  • Hibernation is doing a whole system snapshot somehow. But why do you ask? – Basile Starynkevitch Aug 30 '12 at 06:18
  • You mean "Take Hibernation -> Boot with lvm2 snapshot -> rollback to hibernation with normal boot" ? I think it can work, but it cannot have the same app status. Or, can I copy and edit the hibernation file directly to point my snapshot partition and reboot it? – Marc Kim Aug 30 '12 at 06:30

1 Answers1

1

There is no way to take a snapshot of the entire system from within the system -- doing so would pose some rather difficult questions -- but you can take a snapshot of a subset of the processes in a Linux system using the cgroup freezer system. Alternatively, you can take a snapshot of an entire OpenVZ guest (under a VZ kernel) using vzdump.

Note that neither of these will include a snapshot of your filesystem. You'd have to do that separately, using one of the methods you mentioned.

  • Unfortunately the link to the cgroup freezer system is down. Link to the archive: https://web.archive.org/web/20141108014201/https://www.kernel.org/doc/Documentation/cgroups/freezer-subsystem.txt – Veda Sep 28 '16 at 06:11
  • Not gone, just moved. I've updated the link. –  Sep 28 '16 at 08:22