WorkHabit Blogs

WORKHABIT LABS

Cleaning up after Backup and Migrate.

by Gary Gogick Published: April 4th, 2011
Tagged: drupal, hax
Tagline: 
It's in my /tmp, killing my doodz!

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

AttachmentSize
bm_clean.pl_.txt1.28 KB

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h3>
  • You can use Markdown syntax to format and style the text.

More information about formatting options

Papernote
Papernote

WorkHabit Labs Archives