Using Snapshots in Memory Machine

Capturing a snapshot is almost instantaneous, requiring only that a small amount of metadata be saved to a storage device.

ZeroIO Snapshot retains the actual application data in PMEM, with no time-consuming copying to storage devices. However, depending on how much data is in DRAM, the snapshot is not persistent – able to survive a server crash – until the data in DRAM is flushed to PMEM. This can require a few minutes for large applications. See Snapshot Statuses.

A snapshot of a running application process tree can be captured at any time except when:

  • The process tree is already in process of being snapshotted, restored, or deleted.
  • The process tree is attached for strace or other debug utilities.
  • The snapshot process is run by a nonprivileged user and the process tree was started by a different user.
  • The process has an open tty connection. In this case you cannot capture a snapshot using the Memory Machine Management Center, but you can still take snapshots using the mvmcli command-line utility. See Capturing a Snapshot with CLI.
  • Other less common conditions can prevent a snapshot as well; see a full discussion of Linux snapshots at the Checkpoint/Restore In Userspace (CRIU) website.

When a snapshotted application is restored, it begins running again in exactly the same state as when it was captured, including having the same process ID (PID). Therefore, to restore a snapshot of an application, you must stop the original application or any other processes using the process tree's PIDs. Any work done by the application between the capture and restore is lost.

To duplicate a running process, use clones. Cloning uses namespaces to circumvent PID conflicts. See Cloning an Instance with CLI and Cloning a Snapshot with Memory Machine Management Center.

To duplicate a running process on another host, for example to create redundancy in case of host failure, you can replicate a snapshot using the mvmcli snapshot replicate command. Snapshot replication duplicates the snapshot in another host's PMEM, where it can be restored as if it were on the original machine.See Snapshot Replication.