Database backups persist forever after deleting database

Problem Description

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.

Environment

  • Sympl Version: 10.0
  • Sympl Testing Version? No
  • Debian Version: Buster
  • Hardware Type? Virtual
  • Hosted On? Mythic Beasts

I think that this is reasonable behaviour, it’s safer to keep automatic backups and let someone in the know delete them.

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).

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