Python backup script revisited

Here I wrote about my initial attempts with Python. I started with a backup script for my home-computer because that’s what I needed at the time. Now I’m reviewing and tweaking it.

My considerations at the time of writing the initial script were:

  • It should check if the ...
more ...

Python script to check last exec time and exit code of script

I needed a script that checks:

  • whether a cronjob ran at its determined date (that means it runs regulary)
  • if the cronjob ran successfully

It should also be monitor-able via Nagios. That means, it should provide a meaningful output for when something went wrong with the cronjob, e.g. “CRITICAL: cronjob did not run!”

Of course, someone already had the same requirements and built a Perl-script for it, which in turn can be used as a NRPE-plugin.

more ...

Python Backup Script with rsync

UPDATE: I rewrote the whole script. You can find it here!

I wanted to get into Python recently and to have a reason to actually learn the language, I thought to myself, why not replace the bash-scripts I use on my private computer. I started with my backup script, that saves my home-folder to my external usb-drive.

With this article I’ll describe what I did and why. I’ll have some thoughts in my mind on what the script should do. You’ll see these below. Afterwards I’ll show how I accomplished these things.

more ...