today I tried the delete delete command in the command line option from the web-UI.
As commandline argument I typed “–version=2”
To my surprise, two more versions were deleted.
This here is part of the logs created:
“DeletedSets”: [
{
“Item1”: 2,
“Item2”: “2025-05-12T11:34:47+02:00”
},
{
“Item1”: 9,
“Item2”: “2025-05-07T12:55:36+02:00”
},
{
“Item1”: 10,
“Item2”: “2025-05-07T01:00:01+02:00”
}
As you can see, together with version 2, also version 9 and 10 were deleted, they are also no longer visible in my restore list. Thankfully it’s only a Testing Server plus theres still enough other versions available. So no important data was actually lost.
The backup job is configured to backup once every day with a retention of 7 days. However I did some manual backups yesterday which increased the total count from 7 versions to 10, resulting in two extra versions. The versions deleted were the oldest two versions. So now I have my manual backups from yesterday + 5 days of the scheduled job (which in this case is just 5 days in the past instead of 7 which would be the standard).
Can someone confirm that or is the expected outcome that Duplicati should never delete more versions than those specified in the commandline argument?
I tried searching for a bit but didn’t find a similar post, sorry if this was discussed already.
It certainly sounds like it thinks you’ve set a “Keep a specific number of backups” but you mention that you have it set for a retention of 7 days. Can you describe what you have selected here in this Configuration “Options” (5) item? And what value is in the underlying text box?
I have selected the second option “Delete backups that are older than”
and in the underlying box is “7 | days” selected.
Thanks for your speedy response, let me know if you need any additional information. Even though no important data was lost, I’m trying to find out how this delete command worked because I want to use it to delete specific backup versions on other machines.
I admit I was hoping there would be something obvious that popped out of your answer, but alas, no. I think we’ll need help from others here on the forum. There may some hints in the logs but I wouldn’t know what to suggest.
Also, you may want to mention which version of Duplicati and which OS you’re using.
If not, and you ran the delete on the 14th (time was not stated), the 7th is about 7 days, meaning that’s where the delete after backup would delete – and so would delete alone.
What time of day does it run? Did it run each day? Was delete before or after daily run?
I tried to put together a timeline, but the time and date information was not enough for it.
You are not the first to be surprised by this, but what the commandline UI does is essentially copy all settings from the backup into the UI. You can then click “Run “Backup”” and it will run (almost) identical to when running from the UI.
However, when you change the command from “Backup” to “Delete” you must look at the options and see if there are some that you do not want. As @ts678 shows, the problem is most likely that you already have the --keep-time=7D option set from the backup, and then you add --version=2.
Both these are now applied and anything older than 7 days + version 2 is removed.
Long term, the plan is to implement the individual operations in the UI, so you can avoid using the commandline UI.
Aside: when you go back to the commandline UI, it will reset the contents, which is also unexpected.