问题
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.
回答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.
来源:https://stackoverflow.com/questions/12190556/whole-system-snapshot-on-operating-system