I'm running into this problem as well. Here's some background:
Moodle version: 2.3.6
OS: Linux (CentOS 5.6)
Our automated backups were original configured to be stored in the MoodleData directory. A week or so ago we started running into space issues w/our Moodledata directory during our automated backups. So, we decided to move backups to their own filesystem.
Now automated backups are happily running to our new partition (/var/moodlebackups, let's say). But our moodledata directory is still quite full. Turns out that all the old automated backups from before the switch are still sitting in Moodledata. I'd really like to make these go away.
We've got over 2,000 courses on the system and there's no way I'm going to do this manually. I realize that the new Moodle 2.x filesystem design uses a file's hash as its filename, and stores all the metadata in the database. So, it seems like we'll need some kind of a script to automate this cleanup.
The question is: Has anybody written this script already? If not, are there any pointers to doing so?
Second question: Is this not a bug in automated backup's behaviour, or at the very least an incomplete feature? When you switch from one backup location to another, there should be *some* way to clean out those old backups.