LXD 导出备份失败。快照错误

LXD 导出备份失败。快照错误

两年前,我尝试进行 lxc 备份,但出现某些快照失败的错误。

运行测试命令 lxc export backup /tank/local/lxd/backups-temp/backup_test.tar.gz -v

错误信息: Error: Create backup: Backup create: Snapshot "sunday-2019-12-01" in storage but not expected

+-------------------+----------------------+------------+----------+
|       NAME        |       TAKEN AT       | EXPIRES AT | STATEFUL |
+-------------------+----------------------+------------+----------+
| friday            | 2022/03/11 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| monday            | 2022/03/14 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| saturday          | 2022/03/12 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| sunday-2022-01-23 | 2022/01/23 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| sunday-2022-01-30 | 2022/01/30 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| sunday-2022-02-06 | 2022/02/06 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| sunday-2022-02-13 | 2022/02/13 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| sunday-2022-02-20 | 2022/02/20 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| sunday-2022-02-27 | 2022/02/27 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| sunday-2022-03-06 | 2022/03/06 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| sunday-2022-03-13 | 2022/03/13 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| thursday          | 2022/03/10 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| tuesday           | 2022/03/15 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+
| wednesday         | 2022/03/16 02:02 CET |            | NO       |
+-------------------+----------------------+------------+----------+ 

路径下方/var/snap/lxd/common/lxd/存储池/默认/自定义快照/default_happydays-storage

monday    sunday-2019-10-27  sunday-2019-11-17
saturday  sunday-2019-11-03  sunday-2019-11-24

我找到了这个文件夹并删除了它。但它仍然不起作用。所以它应该在其他地方。我花了很多时间才弄清楚。有人能帮我解决这个问题吗?

答案1

我通过自己的解决方案找到了它。

如果您在 lxc 快照列表中看不到旧备份,则可以使用以下解决方案。然后运行此命令:

1. 列出所有快照

zfs list -t snapshot

2.获取所有列表:

NAME                                                                                                USED  AVAIL  REFER  MOUNTPOINT
tank/lxd/containers/backup@snapshot-sunday-2019-12-08                                               103M      -   816M  -
tank/lxd/containers/backup@snapshot-sunday-2019-12-15                                              71,4M      -   819M  -
tank/lxd/containers/backup@snapshot-sunday-2019-12-22                                              70,3M      -   822M  -
tank/lxd/containers/backup@snapshot-sunday-2019-12-29                                              67,4M      -   824M  -
tank/lxd/containers/backup@snapshot-sunday-2020-01-05                                              60,1M      -   828M  -
tank/lxd/containers/backup@snapshot-sunday-2020-01-12                                              77,3M      -   834M  -
tank/lxd/containers/backup@snapshot-sunday-2020-01-19                                                83M      -   838M  -
tank/lxd/containers/backup@snapshot-sunday-2022-01-23                                               100M      -  44,6G  -
tank/lxd/containers/backup@snapshot-sunday-2022-01-30                                              89,2M      -  44,6G  -
tank/lxd/containers/backup@snapshot-sunday-2022-02-06                                              94,1M      -  44,6G  -
tank/lxd/containers/backup@snapshot-sunday-2022-02-13                                              91,3M      -  44,6G  -

3. 销毁方法如下:

sudo zfs destroy tank/lxd/containers/backup@snapshot-sunday-2019-12-15

sudo zfs destroy tank/lxd/containers/**snapshot name**

相关内容