Capturing a Snapshot with CLI

Capture snapshots of a running application with the Memory Machine CLI utility, mvmcli.

About this task

For information about the CLI utility, see Using the Memory Machine Command Line Tool.
Warning: Changing an application dependency can render a snapshot unrestorable. See Upgrading Application Dependencies.

Procedure

  1. Determine the PID of the application you want to snapshot:
    $ mvmcli snapshot list
    PID    User      Date Started              Command
    -------------------------------------------------------------------
    10918  root      Mon Sep 21 14:01:59 2020  redis-server --port 6380 
    Snapshots:       Date Created              Status      Label
                     Mon Sep 21 14:11:11 2020  Incomplete  test1_97e38023
                     Mon Sep 21 14:30:39 2020  Incomplete  test3_73143fac
    $
  2. Capture the snapshot:
    $ mvmcli snapshot create  -p pid_of_app  -l snapshot_name
    where:
    pid_of_app
    is the PID of the application to be snapshotted.
    snapshot_name
    is a name you assign the snapshot image. A timestamp is appended to the name to create a unique snapshot label for the snapshot. (The timestamp format is YYYYMMDDHHMMSS.) You need this label to restore the snapshot image.
    For example:
    $ mvmcli snapshot create  -p 10918 -l test4
    Successfully dumped process 18074 to /var/memverge/data/label/test4_740a02c2!
    # mvmcli snapshot list
    PID    User      Date Started              Command
    -------------------------------------------------------------------
    10918  root      Mon Sep 21 14:01:59 2020  redis-server --port 6380 
    Snapshots:       Date Created              Status      Label
                     Mon Sep 21 14:11:11 2020  Incomplete  test1_97e38023
                     Mon Sep 21 14:30:39 2020  Incomplete  test3_73143fac
                     Mon Sep 21 14:30:57 2020  Incomplete  test4_740a02c2
    $