Backup script v2

I’ve rewritten my backup script in python (it was in bash) in order to make the old backup handling date-based rather than a simple iteration. So it now renames dirs to daily.1, daily2, weekly1, monthly1 for old backups that are one day, two days, one week, one month old etc.

Not being able to use external programs as easily means the script is about twice as big, but I guess the fewer external dependencies is a good thing. I’m still using ping and rsync binaries, I’d like to replace the ping with something in pure python but I’m not going to be reimplementing rsync in python ;-).

There is also now a very nice option handling system, run gkbackup -h to see all the options. The log output is much better aswell, logging to stdout if running in a terminal and running quietly if not while also logging to a file in both cases if requested.

The new version is here.