Secondary menu

Cleaning up after Backup and Migrate.

Cleaning up after Backup and Migrate.

Written by Gary Gogick on

...Ran into an issue where Backup and Migrate wasn't cleaning up after itself - mysql dumps were sitting in /tmp, stacking up, and causing disks to fill up.

Even if it were cleaning up after itself, I'm dealing with a clustered site. It's my understanding that cleanup should occur on cron - but running cron on every webserver is kind of, well, meh.

Since I'm a believer that all problems can be resolved with perl, the following script can be invoked via system cron, and will clean up any backup_migrate_*.mysql files that are older than one day.