为什么 snap rstore 会失败并显示“预期一个非负整数参数”?

为什么 snap rstore 会失败并显示“预期一个非负整数参数”?

我尝试重新安装 snap 包,我想恢复我的设置。我snap save在删除 snap 包之前做了一些操作。现在我尝试使用以下命令恢复已保存的快照,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')

snap help restore但是我正在遵循和的指示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.

答案1

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.

跑步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

相关内容