-
Notifications
You must be signed in to change notification settings - Fork 726
Closed
Description
When rolling back a failed restore, we wrongly apply the last snapshot. But it is likely that there had been changes since it was last taken/applied.
$ multipass launch --name gentle-beetle
Launched: gentle-beetle
$ multipass stop gentle-beetle
$ multipass snapshot gentle-beetle
Snapshot taken: gentle-beetle.snapshot1
$ multipass snapshot gentle-beetle
Snapshot taken: gentle-beetle.snapshot2
$ multipass exec gentle-beetle -- touch asdf
$ multipass stop gentle-beetle
$ sudo chattr +i /root/.local/share/multipassd/vault/instances/gentle-beetle/snapshot-head
$ multipass restore --destructive gentle-beetle.snapshot1
[2024-01-09T18:34:33.890] [error] [gentle-beetle] Caught an unhandled exception: failed to open file '/root/.local/share/multipassd/vault/instances/gentle-beetle/snapshot-head' for writing
restore failed: failed to open file '/root/.local/share/multipassd/vault/instances/gentle-beetle/snapshot-head' for writing
$ multipass exec gentle-beetle -- ls
$ # nothing
To make snapshot-head editable again:
$ sudo chattr -i /root/.local/share/multipassd/vault/instances/gentle-beetle/snapshot-head