pyznap icon indicating copy to clipboard operation
pyznap copied to clipboard

Does Not Perform Snapshot Cleanup

Open MrHamel opened this issue 1 year ago • 4 comments

On a Proxmox install of mine, pyznap is not removing the old snapshots, even though clean = yes is specified in the config file.

Below is what I mean by very old snapshots. I would like to only keep the snapshots as mentioned in the schedule.

storage@pyznap_2023-02-03_10:57:31_monthly                       0B      -       30K  -
storage@pyznap_2023-02-03_10:57:31_weekly                        0B      -       30K  -
storage@pyznap_2023-02-03_10:57:31_daily                         0B      -       30K  -
storage@pyznap_2023-02-04_00:00:01_daily                         0B      -       30K  -
storage@pyznap_2023-02-05_00:00:01_daily                         0B      -       30K  -
storage@pyznap_2023-02-06_00:00:01_weekly                        0B      -       30K  -
storage@pyznap_2023-02-06_00:00:01_daily                         0B      -       30K  -
storage@pyznap_2023-02-07_00:00:01_daily                         0B      -       30K  -
storage@pyznap_2023-02-08_00:00:01_daily                         0B      -       30K  -
storage@pyznap_2023-02-09_00:00:01_daily                         0B      -       30K  -
storage@pyznap_2023-02-10_00:00:01_daily                         0B      -       30K  -
storage@pyznap_2023-02-11_00:00:02_daily                         0B      -       30K  -
storage@pyznap_2023-02-12_00:00:01_daily                         0B      -       30K  -
storage@pyznap_2023-02-13_00:00:01_weekly                        0B      -       30K  -

MrHamel avatar Dec 17 '23 19:12 MrHamel

I had the same problem, until I realized I was only pulling with 'send' and not doing the cleanup with 'snap --clean'. They have to be done separately. At least that was my problem when I did a new install after a long time.

aaltonenp avatar Dec 20 '23 08:12 aaltonenp

This does not resolve the issue unfortunately. I got a 200GB container eating 2TB because it hasn't cleaned anything up in the last 9 months.

MrHamel avatar May 31 '24 13:05 MrHamel

To clarify, I want it to cleanup the snapshots on the local pool before sending.

MrHamel avatar May 31 '24 13:05 MrHamel

It just dawned on me what the issue was. In the config file, if comments proceed the parameters value, it does not get parsed correctly. These config file parsing bugs create some real gotchas and need to be resolved ASAP.

Valid:

clean = yes

Invalid:

clean = yes # This is a random comment

MrHamel avatar May 31 '24 14:05 MrHamel