`multipass restore` command

See also: snapshot, list, info, delete

The multipass restore command restores an instance to the state that it was in when the given snapshot was taken:

$ multipass restore relative-lion.snapshot2
Do you want to take a snapshot of relative-lion before discarding its current state? (Yes/no): y
Snapshot taken: relative-lion.snapshot3
Snapshot restored: relative-lion.snapshot2

As shown in the example above, with no further options, the command will normally offer to take another snapshot. This automatic snapshot saves the instance’s current state before it is thrown away. It will be named as if multipass snapshot had been used, and it will have an automatic comment to easily signal its purpose:

$ multipass info relative-lion.snapshot3 | grep Comment
Comment:        Before restoring snapshot1

You can add --destructive (or -d) to skip the question and discard the current state. If the command is run non-interactively (i.e. with either standard input or standard output being redirected), this flag is required, since there is no way to query the user for confirmation.


The full multipass help restore output explains the available options:

Usage: multipass restore [options] <instance>.<snapshot>
Restore an instance to the state of a previously taken snapshot.

Options:
  -h, --help         Displays help on commandline options
  -v, --verbose      Increase logging verbosity. Repeat the 'v' in the short
                     option for more detail. Maximum verbosity is obtained with
                     4 (or more) v's, i.e. -vvvv.
  -d, --destructive  Discard the current state of the instance

Arguments:
  instance.snapshot  The instance to restore and snapshot to use, in
                     <instance>.<snapshot> format, where <instance> is the name
                     of an instance, and <snapshot> is the name of a snapshot

Last updated 2 months ago.