Kontrollkit – new backup script is partition space aware

I’ve been wanting to write a backup script for a while now that does the following: reads the partition information for the directory that you are backing up into and computes the used/available/percentage-available space. Then it reads the total data size from the MySQL tables and ensures that you have enough space on disk (for the backup file and the compressed version of the file during processing) before it starts the backup. This allows you to run the backup script without worrying that it will fill up the partition in the middle of the night and trigger a disk space alert on your server (which inevitably gets you woken up with a call or txt from the monitoring team).

So this new script does just that – it makes sure that you have enough room on disk before running the backup. If enabled in the config it will compress the file. It also does file pruning when configured to do so – this lets the script manage how many days of backup files to keep on disk so that the files get rotated out on a daily basis. Email reporting is also included. The script is called kt-backup-ai.py

You can find the script in the newest version of Kontrollkit: http://kontrollsoft.com/software-kontrollkit , or on Google Code: http://code.google.com/p/kontrollkit/


Comments are closed.