Number of snapshots not being reduced by forget --prune

Since some of my forget operations have been getting longer and longer over time, I took a closer look at my system and realized that I have 1390 snapshots. That’s way too many and looking at the policies in place, there shouldn’t be more than 200.

So I tried to clean up manually which didn’t work as expected.

I have one backup tag called “VM1”, I can see the number of snapshots using

restic -r myrepo snapshots --tag VM1

That gives me back that I have 109 snapshots in place for that tag. So, I then run the following forget command:

restic -r myrepo forget --tag VM1 --keep-last 1 --keep-daily 3 --keep-weekly 4 --prune

I would assume that this would delete 101 of the 109 snapshots. It correctly states in the beginning of the output:

Applying Policy: keep 1 latest, 3 daily, 4 weekly snapshots

But then it just goes on to show 109 times “keep 1 snapshots” with no error whatsoever.

Why is this happening and what can I do to correct it? I was using restic 14 when most of the backups were created but upgrade to the latest version today with no effect.

Can you simply show us the command and output from restic -r myrepo snapshots --tag VM1 and also the command and output from restic -r myrepo forget --tag VM1 --keep-last 1 --keep-daily 3 --keep-weekly 4 --dry-run (note the --dry-run replacing the --prune)? Much easier to reason about something concrete.

Hi, of course, here it is:

# restic -r b2:myrepo snapshots --tag VM1
repository ee9b8ae6 opened (version 1)
ID        Time                 HostTagsPaths
----------------------------------------------------------------------------------------------
25bf47e5  2023-07-10 03:12:51  sb32        VM1    /srv/lxdexport/20230710_VM1.tar.gz
f363b9ae  2023-07-11 03:13:05  sb32        VM1    /srv/lxdexport/20230711_VM1.tar.gz
47b8d658  2023-07-12 03:12:53  sb32        VM1    /srv/lxdexport/20230712_VM1.tar.gz
30db32eb  2023-07-13 03:13:03  sb32        VM1    /srv/lxdexport/20230713_VM1.tar.gz
a6508d29  2023-07-14 03:13:08  sb32        VM1    /srv/lxdexport/20230714_VM1.tar.gz
30db32eb  2023-07-13 03:13:03  sb32        VM1    /srv/lxdexport/20230713_VM1.tar.gz                [81/2000]
a6508d29  2023-07-14 03:13:08  sb32        VM1    /srv/lxdexport/20230714_VM1.tar.gz
f2845015  2023-07-15 03:12:52  sb32        VM1    /srv/lxdexport/20230715_VM1.tar.gz
9f318f17  2023-07-16 03:13:07  sb32        VM1    /srv/lxdexport/20230716_VM1.tar.gz
74bdf953  2023-07-17 03:12:58  sb32        VM1    /srv/lxdexport/20230717_VM1.tar.gz
5b156c79  2023-07-18 03:13:02  sb32        VM1    /srv/lxdexport/20230718_VM1.tar.gz
453c0993  2023-07-19 03:13:50  sb32        VM1    /srv/lxdexport/20230719_VM1.tar.gz
8cb2858b  2023-07-20 03:13:01  sb32        VM1    /srv/lxdexport/20230720_VM1.tar.gz
62c2b5eb  2023-07-21 03:13:07  sb32        VM1    /srv/lxdexport/20230721_VM1.tar.gz
1fb2ab50  2023-07-22 03:13:11  sb32        VM1    /srv/lxdexport/20230722_VM1.tar.gz
581af5a3  2023-07-23 03:12:52  sb32        VM1    /srv/lxdexport/20230723_VM1.tar.gz
35a98f77  2023-07-24 03:12:53  sb32        VM1    /srv/lxdexport/20230724_VM1.tar.gz
9d985432  2023-07-25 03:12:58  sb32        VM1    /srv/lxdexport/20230725_VM1.tar.gz
eba74e64  2023-07-26 03:12:59  sb32        VM1    /srv/lxdexport/20230726_VM1.tar.gz
42a15c7a  2023-07-27 03:12:53  sb32        VM1    /srv/lxdexport/20230727_VM1.tar.gz
4040edbf  2023-07-28 03:12:58  sb32        VM1    /srv/lxdexport/20230728_VM1.tar.gz
2b4c28b6  2023-07-29 03:12:56  sb32        VM1    /srv/lxdexport/20230729_VM1.tar.gz
dda8cfb7  2023-07-30 03:13:02  sb32        VM1    /srv/lxdexport/20230730_VM1.tar.gz
b1cb8fb7  2023-07-31 03:12:42  sb32        VM1    /srv/lxdexport/20230731_VM1.tar.gz
c89e4e15  2023-08-01 03:12:48  sb32        VM1    /srv/lxdexport/20230801_VM1.tar.gz
fff46a73  2023-08-02 03:12:47  sb32        VM1    /srv/lxdexport/20230802_VM1.tar.gz
091a1ab8  2023-08-03 03:13:11  sb32        VM1    /srv/lxdexport/20230803_VM1.tar.gz
47f9b14c  2023-08-04 03:12:52  sb32        VM1    /srv/lxdexport/20230804_VM1.tar.gz
2316da7f  2023-08-05 03:12:55  sb32        VM1    /srv/lxdexport/20230805_VM1.tar.gz
909ca290  2023-08-06 03:12:52  sb32        VM1    /srv/lxdexport/20230806_VM1.tar.gz
be90937f  2023-08-07 03:12:55  sb32        VM1    /srv/lxdexport/20230807_VM1.tar.gz
0127e8b8  2023-08-08 03:13:07  sb32        VM1    /srv/lxdexport/20230808_VM1.tar.gz
2de71812  2023-08-09 03:12:56  sb32        VM1    /srv/lxdexport/20230809_VM1.tar.gz
ae2e0b70  2023-08-10 03:12:36  sb32        VM1    /srv/lxdexport/20230810_VM1.tar.gz
2de71812  2023-08-09 03:12:56  sb32        VM1    /srv/lxdexport/20230809_VM1.tar.gz                [54/2000]
ae2e0b70  2023-08-10 03:12:36  sb32        VM1    /srv/lxdexport/20230810_VM1.tar.gz
c07d7902  2023-08-11 03:13:09  sb32        VM1    /srv/lxdexport/20230811_VM1.tar.gz
7b80119c  2023-08-12 03:13:09  sb32        VM1    /srv/lxdexport/20230812_VM1.tar.gz
f9521475  2023-08-13 03:13:05  sb32        VM1    /srv/lxdexport/20230813_VM1.tar.gz
ff2ea564  2023-08-14 03:12:58  sb32        VM1    /srv/lxdexport/20230814_VM1.tar.gz
65048c02  2023-08-15 03:13:00  sb32        VM1    /srv/lxdexport/20230815_VM1.tar.gz
0ee1c1cf  2023-08-16 03:13:05  sb32        VM1    /srv/lxdexport/20230816_VM1.tar.gz
fc4302fa  2023-08-17 03:13:11  sb32        VM1    /srv/lxdexport/20230817_VM1.tar.gz
85ccf498  2023-08-18 03:13:06  sb32        VM1    /srv/lxdexport/20230818_VM1.tar.gz
a873a696  2023-08-19 03:13:09  sb32        VM1    /srv/lxdexport/20230819_VM1.tar.gz
26748801  2023-08-20 03:13:19  sb32        VM1    /srv/lxdexport/20230820_VM1.tar.gz
374267c7  2023-08-21 03:13:03  sb32        VM1    /srv/lxdexport/20230821_VM1.tar.gz
af26520e  2023-08-22 03:13:20  sb32        VM1    /srv/lxdexport/20230822_VM1.tar.gz
2514eeb0  2023-08-23 03:13:10  sb32        VM1    /srv/lxdexport/20230823_VM1.tar.gz
dee97eb7  2023-08-24 03:13:12  sb32        VM1    /srv/lxdexport/20230824_VM1.tar.gz
b163f161  2023-08-25 03:13:19  sb32        VM1    /srv/lxdexport/20230825_VM1.tar.gz
4370678b  2023-08-26 03:13:11  sb32        VM1    /srv/lxdexport/20230826_VM1.tar.gz
fda2da79  2023-08-27 03:13:10  sb32        VM1    /srv/lxdexport/20230827_VM1.tar.gz
96b8e32c  2023-08-28 03:13:00  sb32        VM1    /srv/lxdexport/20230828_VM1.tar.gz
6cbde035  2023-08-29 03:13:16  sb32        VM1    /srv/lxdexport/20230829_VM1.tar.gz
9de0bc60  2023-08-30 03:12:56  sb32        VM1    /srv/lxdexport/20230830_VM1.tar.gz
e06834c9  2023-08-31 03:13:42  sb32        VM1    /srv/lxdexport/20230831_VM1.tar.gz
7f371416  2023-09-01 03:13:23  sb32        VM1    /srv/lxdexport/20230901_VM1.tar.gz
3f7f547b  2023-09-02 03:13:06  sb32        VM1    /srv/lxdexport/20230902_VM1.tar.gz
f44b4715  2023-09-03 03:13:44  sb32        VM1    /srv/lxdexport/20230903_VM1.tar.gz
4bee88c3  2023-09-04 03:13:10  sb32        VM1    /srv/lxdexport/20230904_VM1.tar.gz
8ddc5b32  2023-09-05 03:13:16  sb32        VM1    /srv/lxdexport/20230905_VM1.tar.gz
80abb6fc  2023-09-06 03:13:05  sb32        VM1    /srv/lxdexport/20230906_VM1.tar.gz
8ddc5b32  2023-09-05 03:13:16  sb32        VM1    /srv/lxdexport/20230905_VM1.tar.gz                [27/2000]
80abb6fc  2023-09-06 03:13:05  sb32        VM1    /srv/lxdexport/20230906_VM1.tar.gz
1c21af0e  2023-09-07 03:12:57  sb32        VM1    /srv/lxdexport/20230907_VM1.tar.gz
be43cf62  2023-09-08 03:13:05  sb32        VM1    /srv/lxdexport/20230908_VM1.tar.gz
ceb2d8ec  2023-09-09 03:13:32  sb32        VM1    /srv/lxdexport/20230909_VM1.tar.gz
ff695126  2023-09-10 03:13:27  sb32        VM1    /srv/lxdexport/20230910_VM1.tar.gz
88c66cc7  2023-09-11 03:13:11  sb32        VM1    /srv/lxdexport/20230911_VM1.tar.gz
70a34926  2023-09-12 03:13:09  sb32        VM1    /srv/lxdexport/20230912_VM1.tar.gz
732e4167  2023-09-13 03:13:28  sb32        VM1    /srv/lxdexport/20230913_VM1.tar.gz
bd8bb6ee  2023-09-14 03:13:04  sb32        VM1    /srv/lxdexport/20230914_VM1.tar.gz
ea5a3c6a  2023-09-15 03:13:11  sb32        VM1    /srv/lxdexport/20230915_VM1.tar.gz
531bee9f  2023-10-23 15:16:43  sb32        VM1    /srv/lxdexport/20231023_VM1.tar.gz
67c2b386  2023-10-24 03:13:38  sb32        VM1    /srv/lxdexport/20231024_VM1.tar.gz
3452278e  2023-10-25 03:14:01  sb32        VM1    /srv/lxdexport/20231025_VM1.tar.gz
c039dcfe  2023-10-26 03:14:20  sb32        VM1    /srv/lxdexport/20231026_VM1.tar.gz
82fd0c9f  2023-10-27 03:27:33  sb32        VM1    /srv/lxdexport/20231027_VM1.tar.gz
058e8c15  2023-10-28 03:27:14  sb32        VM1    /srv/lxdexport/20231028_VM1.tar.gz
14e3effb  2023-10-29 03:26:45  sb32        VM1    /srv/lxdexport/20231029_VM1.tar.gz
35a3818b  2023-10-30 03:14:06  sb32        VM1    /srv/lxdexport/20231030_VM1.tar.gz
2f34edc2  2023-10-31 03:13:40  sb32        VM1    /srv/lxdexport/20231031_VM1.tar.gz
a70d211c  2023-11-01 03:14:16  sb32        VM1    /srv/lxdexport/20231101_VM1.tar.gz
7b985ae2  2023-11-02 03:13:49  sb32        VM1    /srv/lxdexport/20231102_VM1.tar.gz
65910cc3  2023-11-03 03:14:22  sb32        VM1    /srv/lxdexport/20231103_VM1.tar.gz
4c9ae2ef  2023-11-04 03:13:57  sb32        VM1    /srv/lxdexport/20231104_VM1.tar.gz
b590868e  2023-11-05 03:13:49  sb32        VM1    /srv/lxdexport/20231105_VM1.tar.gz
a7de6875  2023-11-06 03:14:18  sb32        VM1    /srv/lxdexport/20231106_VM1.tar.gz
3b586945  2023-11-07 03:14:13  sb32        VM1    /srv/lxdexport/20231107_VM1.tar.gz
da2a5fd4  2023-11-08 03:14:10  sb32        VM1    /srv/lxdexport/20231108_VM1.tar.gz
baa6f2e4  2023-11-09 03:14:22  sb32        VM1    /srv/lxdexport/20231109_VM1.tar.gz
d24dbd19  2023-11-10 03:14:25  sb32        VM1    /srv/lxdexport/20231110_VM1.tar.gz
99cda01f  2023-11-11 03:14:00  sb32        VM1    /srv/lxdexport/20231111_VM1.tar.gz
9be70d3c  2023-11-12 03:14:35  sb32        VM1    /srv/lxdexport/20231112_VM1.tar.gz
97c900bd  2023-11-13 03:14:21  sb32        VM1    /srv/lxdexport/20231113_VM1.tar.gz
10d5323f  2023-11-14 03:14:20  sb32        VM1    /srv/lxdexport/20231114_VM1.tar.gz
c6907554  2023-11-15 03:14:52  sb32        VM1    /srv/lxdexport/20231115_VM1.tar.gz
53c4ce97  2023-11-16 03:14:03  sb32        VM1    /srv/lxdexport/20231116_VM1.tar.gz
78c4bf82  2023-11-17 03:14:13  sb32        VM1    /srv/lxdexport/20231117_VM1.tar.gz
3e2428e3  2023-11-18 03:14:26  sb32        VM1    /srv/lxdexport/20231118_VM1.tar.gz
69f6328f  2023-11-19 03:14:09  sb32        VM1    /srv/lxdexport/20231119_VM1.tar.gz
2ea850ea  2023-11-20 03:14:08  sb32        VM1    /srv/lxdexport/20231120_VM1.tar.gz
611cbac4  2023-11-21 03:14:09  sb32        VM1    /srv/lxdexport/20231121_VM1.tar.gz
b1339d2e  2023-11-22 03:14:25  sb32        VM1    /srv/lxdexport/20231122_VM1.tar.gz
f37f5c02  2023-11-23 03:14:00  sb32        VM1    /srv/lxdexport/20231123_VM1.tar.gz
9fe54137  2023-11-24 03:14:34  sb32        VM1    /srv/lxdexport/20231124_VM1.tar.gz
51080eda  2023-11-25 03:14:02  sb32        VM1    /srv/lxdexport/20231125_VM1.tar.gz
33ce811b  2023-11-26 03:14:19  sb32        VM1    /srv/lxdexport/20231126_VM1.tar.gz
d7ec12c8  2023-11-27 03:13:37  sb32        VM1    /srv/lxdexport/20231127_VM1.tar.gz
3d28d849  2023-11-28 03:14:08  sb32        VM1    /srv/lxdexport/20231128_VM1.tar.gz
a74937a9  2023-11-29 03:14:39  sb32        VM1    /srv/lxdexport/20231129_VM1.tar.gz
918dfeab  2023-11-30 03:14:07  sb32        VM1    /srv/lxdexport/20231130_VM1.tar.gz
92705261  2023-12-02 03:14:00  sb32        VM1    /srv/lxdexport/20231202_VM1.tar.gz
----------------------------------------------------------------------------------------------
108 snapshots

The following output I had to truncate as I can only post half here.

# restic -r b2:myrepo forget --tag VM1 --keep-last 1 --keep-daily 3 --keep-weekly 4 --dry-run 
Applying Policy: keep 1 latest, 3 daily, 4 weekly snapshots
keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
3b586945  2023-11-07 03:14:13  sb32        VM1    last snapshot    /srv/lxdexport/20231107_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
82fd0c9f  2023-10-27 03:27:33  sb32        VM1    last snapshot    /srv/lxdexport/20231027_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
e06834c9  2023-08-31 03:13:42  sb32        VM1    last snapshot    /srv/lxdexport/20230831_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
531bee9f  2023-10-23 15:16:43  sb32        VM1    last snapshot    /srv/lxdexport/20231023_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
70a34926  2023-09-12 03:13:09  sb32        VM1    last snapshot    /srv/lxdexport/20230912_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
f9521475  2023-08-13 03:13:05  sb32        VM1    last snapshot    /srv/lxdexport/20230813_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
47f9b14c  2023-08-04 03:12:52  sb32        VM1    last snapshot    /srv/lxdexport/20230804_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
7b985ae2  2023-11-02 03:13:49  sb32        VM1    last snapshot    /srv/lxdexport/20231102_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
a873a696  2023-08-19 03:13:09  sb32        VM1    last snapshot    /srv/lxdexport/20230819_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
374267c7  2023-08-21 03:13:03  sb32        VM1    last snapshot    /srv/lxdexport/20230821_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
611cbac4  2023-11-21 03:14:09  sb32        VM1    last snapshot    /srv/lxdexport/20231121_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
fc4302fa  2023-08-17 03:13:11  sb32        VM1    last snapshot    /srv/lxdexport/20230817_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
2de71812  2023-08-09 03:12:56  sb32        VM1    last snapshot    /srv/lxdexport/20230809_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
35a98f77  2023-07-24 03:12:53  sb32        VM1    last snapshot    /srv/lxdexport/20230724_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
14e3effb  2023-10-29 03:26:45  sb32        VM1    last snapshot    /srv/lxdexport/20231029_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
2f34edc2  2023-10-31 03:13:40  sb32        VM1    last snapshot    /srv/lxdexport/20231031_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
3d28d849  2023-11-28 03:14:08  sb32        VM1    last snapshot    /srv/lxdexport/20231128_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
9be70d3c  2023-11-12 03:14:35  sb32        VM1    last snapshot    /srv/lxdexport/20231112_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
f363b9ae  2023-07-11 03:13:05  sb32        VM1    last snapshot    /srv/lxdexport/20230711_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
f37f5c02  2023-11-23 03:14:00  sb32        VM1    last snapshot    /srv/lxdexport/20231123_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
a6508d29  2023-07-14 03:13:08  sb32        VM1    last snapshot    /srv/lxdexport/20230714_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
bd8bb6ee  2023-09-14 03:13:04  sb32        VM1    last snapshot    /srv/lxdexport/20230914_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
ceb2d8ec  2023-09-09 03:13:32  sb32        VM1    last snapshot    /srv/lxdexport/20230909_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
dda8cfb7  2023-07-30 03:13:02  sb32        VM1    last snapshot    /srv/lxdexport/20230730_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
10d5323f  2023-11-14 03:14:20  sb32        VM1    last snapshot    /srv/lxdexport/20231114_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
a70d211c  2023-11-01 03:14:16  sb32        VM1    last snapshot    /srv/lxdexport/20231101_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
ae2e0b70  2023-08-10 03:12:36  sb32        VM1    last snapshot    /srv/lxdexport/20230810_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
d24dbd19  2023-11-10 03:14:25  sb32        VM1    last snapshot    /srv/lxdexport/20231110_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
3452278e  2023-10-25 03:14:01  sb32        VM1    last snapshot    /srv/lxdexport/20231025_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
909ca290  2023-08-06 03:12:52  sb32        VM1    last snapshot    /srv/lxdexport/20230806_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
fda2da79  2023-08-27 03:13:10  sb32        VM1    last snapshot    /srv/lxdexport/20230827_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
091a1ab8  2023-08-03 03:13:11  sb32        VM1    last snapshot    /srv/lxdexport/20230803_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
9f318f17  2023-07-16 03:13:07  sb32        VM1    last snapshot    /srv/lxdexport/20230716_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
a74937a9  2023-11-29 03:14:39  sb32        VM1    last snapshot    /srv/lxdexport/20231129_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
da2a5fd4  2023-11-08 03:14:10  sb32        VM1    last snapshot    /srv/lxdexport/20231108_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
dee97eb7  2023-08-24 03:13:12  sb32        VM1    last snapshot    /srv/lxdexport/20230824_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
65910cc3  2023-11-03 03:14:22  sb32        VM1    last snapshot    /srv/lxdexport/20231103_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
c039dcfe  2023-10-26 03:14:20  sb32        VM1    last snapshot    /srv/lxdexport/20231026_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots


[...deleted many lines...]

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
b163f161  2023-08-25 03:13:19  sb32        VM1    last snapshot    /srv/lxdexport/20230825_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
0ee1c1cf  2023-08-16 03:13:05  sb32        VM1    last snapshot    /srv/lxdexport/20230816_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
4040edbf  2023-07-28 03:12:58  sb32        VM1    last snapshot    /srv/lxdexport/20230728_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
67c2b386  2023-10-24 03:13:38  sb32        VM1    last snapshot    /srv/lxdexport/20231024_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
ff2ea564  2023-08-14 03:12:58  sb32        VM1    last snapshot    /srv/lxdexport/20230814_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
2ea850ea  2023-11-20 03:14:08  sb32        VM1    last snapshot    /srv/lxdexport/20231120_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
74bdf953  2023-07-17 03:12:58  sb32        VM1    last snapshot    /srv/lxdexport/20230717_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
058e8c15  2023-10-28 03:27:14  sb32        VM1    last snapshot    /srv/lxdexport/20231028_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
1c21af0e  2023-09-07 03:12:57  sb32        VM1    last snapshot    /srv/lxdexport/20230907_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
51080eda  2023-11-25 03:14:02  sb32        VM1    last snapshot    /srv/lxdexport/20231125_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
d7ec12c8  2023-11-27 03:13:37  sb32        VM1    last snapshot    /srv/lxdexport/20231127_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
26748801  2023-08-20 03:13:19  sb32        VM1    last snapshot    /srv/lxdexport/20230820_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
65048c02  2023-08-15 03:13:00  sb32        VM1    last snapshot    /srv/lxdexport/20230815_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
0127e8b8  2023-08-08 03:13:07  sb32        VM1    last snapshot    /srv/lxdexport/20230808_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
35a3818b  2023-10-30 03:14:06  sb32        VM1    last snapshot    /srv/lxdexport/20231030_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

keep 1 snapshots:
ID        Time                 Host        Tags        Reasons          Paths
---------------------------------------------------------------------------------------------------------------
3f7f547b  2023-09-02 03:13:06  sb32        VM1    last snapshot    /srv/lxdexport/20230902_VM1.tar.gz
                                                       daily snapshot
                                                       weekly snapshot
---------------------------------------------------------------------------------------------------------------
1 snapshots

root@sb32/srv/backupscripts#

So, if you look at the path for each snapshot, it’s different because of the date in the filename changing.

This is the reason for your problem, and it can be easily fixed by adding --group-by host,tags to the forget command.

If you read the paragraph beginning with “When forget is run with a policy …” at Removing backup snapshots — restic 0.16.2 documentation it will become clear what’s going on :slight_smile:

3 Likes

I’ll try that - thanks a lot for the hint!