Settings in the backup

Hello. I have made these settings in the backup, but it does not delete the old ones. What else should I do to have only one backup?

Webmin version 2.111 Usermin version 2.010
Virtualmin version 7.10.0

Please upload the image here. I click on this and get a link to another site.
But to answer the question, it looks like you probably have it set up correctly. Too small on my screen to tell for sure though.
image
What does you directory listing look like?

root@main:/home/backup/domains/full# ls -lah
total 60K
drwxr-xr-x 15 root root 4.0K Jun 15 14:32 .
drwxr-xr-x  4 root root 4.0K Mar 25  2023 ..
drwx------  2 root root 4.0K Mar 23 14:31 full_2024_03_23
drwx------  2 root root 4.0K Mar 30 14:31 full_2024_03_30
drwx------  2 root root 4.0K Apr  6 14:31 full_2024_04_06
drwx------  2 root root 4.0K Apr 13 14:31 full_2024_04_13
drwx------  2 root root 4.0K Apr 20 14:31 full_2024_04_20
drwx------  2 root root 4.0K Apr 27 14:31 full_2024_04_27
drwx------  2 root root 4.0K May  4 14:31 full_2024_05_04
drwx------  2 root root 4.0K May 11 14:31 full_2024_05_11
drwx------  2 root root 4.0K May 18 14:32 full_2024_05_18
drwx------  2 root root 4.0K May 25 14:35 full_2024_05_25
drwx------  2 root root 4.0K Jun  1 14:32 full_2024_06_01
drwx------  2 root root 4.0K Jun  8 14:32 full_2024_06_08
drwx------  2 root root 4.0K Jun 15 14:32 full_2024_06_15
1 Like

I fixed the photo, I think it’s ok now.

root@cp:/home/Backups# ls -lah
total 12K
drwxr-xr-x 3 root root 4.0K May 26 00:00 .
drwxr-xr-x 7 root root 4.0K Jun 2 00:56 …
drwxr-xr-x 3 root root 4.0K Jun 3 11:15 24
root@cp:/home/Backups#

backup2

As you can see in the photo, I have backups 18, 19, 20 and 21, which is today’s. I want to keep only 1 day because I don’t have dance on the hard disk.

1 Like

You have to use date based backups.

This can only be used if your backup path contains date substitution tokens, like /backup/virtualmin-%Y-%m-%d. If not, Virtualmin will not be able to work out which files and directories are backups that it made in order to safely delete them.

2 Likes

I’m no expert here but I’m guessing the / might be an issue. You are creating different directories with each one instead of having one date string? Try the format in the documentation that @popmay so kindly pointed to.

1 Like

Ok I changed it to /home/Backups/virtualmin-%Y-%m-%d as you told me. I’ll see tonight if it deletes the old files. Thanks

I received this email, so the deletion works fine now!

Deleting backups from local file /home/Backups matching virtualmin-.-.-.* older
than 1 days …
Deleting directory /home/Backups/virtualmin-2024-06-22, which is 2 days old …
… deleted 4.98 GiB.
deleted 1 old backups, and skipped 2 that were not old enough

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.