Last year, I deleted some databases that I no longer used. However, they still appear in my backups, e.g.
ls -l /var/backups/mysql
-rw-rw---- 1 sympl sympl 1679597 Dec 23 2021 mariadb_10.3--databasename--20211223_072220_GMT_Thursday.sql.gz
Is this intentional behaviour or a bug? My expectation for backups is that if I delete something it will eventually rotate out of my backups, but in this case a file has been there for nearly 9 months. I only noticed this by chance when synchronising my backups to another machine.
It’s intended behaviour - you’ll still get local backup copies, but you can remove the backup - typical DB dump sizes are small, so the decision was made to keep them indefinitely and let the user remove them rather than try and work out how long they should be around after the DB was removed.
As they don’t change you’ll only have a single copy in the backups for each set, so they won’t take a huge amount of space.
Thanks, I’ll delete the backups manually then (I generally expect deleted items to be rotated out of backups eventually, which is why I was surprised that these weren’t).