One of the routine processes I have set up in my job is a scheduled backup of all my development work. I have two machines – a Linux box that acts as a development webserver and stays on all the time and a Windows box that is mainly used for accessing email and network drives and gets switched off overnight. I had concoted a cunning system where the Linux box backed itself up in the middle of the night and then copied the most recent files to the Windows box when it became available the next morning.
The process was also neat and tidy, with all but the most recent backup removed from the Windows machine and files older than 7 days removed from the Linux machine. Unfortunately there was a small glitch in my logic and the Linux to Windows script, the peak of my Python development skills so far, suffered from a fatal mistake. It lived in the backup directory, which wasn’t itself included in the backup routine, and, when it had been working smoothly for 7 days, was itself neatly removed.
Whoops! Fortunately I also built in a log file so quickly spotted that the copying wasn’t occuring and figured out why. I am having to rebuild the script from the ground up. That is not a disaster as I am learning more about Python scripting all the time (the new version features a number of discrete, reusable functions and is properly documented); from now on though, I will make sure I keep all my development work in locations that do benefit from the backup routine!
Want to add something? Please join the conversation about this posting (nb. Yahoo! account required to log into Flickr).