House Keeping the SQL Dumps

As written in my previous post, the backups had became unwieldy and needed to be archived.

So i added another script to the CronTab to run at 00:01 on the 1st of every month.

I had wanted to do a bit of math to make it see what jobs were created last month and go from there, but that wasn’t so easy.

Using the find command i used any thing greater than 31 days as a catch all and hoped for the best…

Simple Shell Backup script

I had a need to backup some Call logging/asset management software we have running on a CentOs7 install to a network location, so that we can restore, should everything go tits up.

It contains a backup of the MySQL DB’s and TARing them for moving to a new location and output to a log file.

This could probably be slimmed down immensely, but it was my 1st shell script, so it’s rough around the edges!