我试图重新安装一个 snap 包,我想要我的设置。我snap save在删除快照之前做了一个。现在我试图用snap restore它来恢复保存的快照,但它失败了:
root@josh-workstation:/# snap restore lxd 1
error: invalid argument for snapshot set id: expected a non-negative integer argument (see 'snap help saved')
Run Code Online (Sandbox Code Playgroud)
但是,我按照snap help restoreand的指示进行操作snap help saved,所以...有什么关系?
root@josh-workstation:/# snap help restore
Usage:
snap restore [restore-OPTIONS] <snap> <id>...
The restore command replaces the current user, system and
configuration data of included snaps, with the corresponding data from
the specified snapshot.
Run Code Online (Sandbox Code Playgroud)
snap help 向后,实际命令首先获取 ID
它应该是:
root@josh-workstation:/# snap help restore
Usage:
snap restore [restore-OPTIONS] <id> [<snap>]...
The restore command replaces the current user, system and
configuration data of included snaps, with the corresponding data from
the specified snapshot.
Run Code Online (Sandbox Code Playgroud)
跑步snap restore 1 lxd有效。
root@josh-workstation:/# snap --version
snap 2.44.3
snapd 2.44.3
series 16
ubuntu 18.04
kernel 5.3.0-51-generic
Run Code Online (Sandbox Code Playgroud)