`multipass restore` command

Errors or typos? Topics missing? Hard to read? Let us know or open an issue on GitHub.

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.

  -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

  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 a month ago. Help improve this document in the forum.