paulgorman.org

< ^ txt

Thu Jan 30 07:48:32 EST 2015 Slept OK. I prepared the timed coffee maker last night rather than making coffee this morning. It was nice to wake up with coffee ready, and it saved time in the morning. Goals: Work: - Budget summary spreadsheet for CFO No. I ended up spending a bunch of time on the bank integration instead. - Credit line approved; order new servers! No, I want to wait until Scott is here to get his input. However, I *will* order RAM for the database server. RAM ordered! Home: - Set up local backup. When we do a backup, write a file recording when. Run a periodic (hourly?) cron job to check that file. If the last backup was greater than N days, xmessage me to run the backup. Good. I wrote the nag script, and set up the cron job. #!/usr/bin/env python # backupcheck # # A Python script to nag the user if a backup hasn't been done in N days. # # A cron job should run a nag script every few hours: # m h dom mon dow command # 59 * * * * /home/paulgorman/bin/backupcheck # # Paul Gorman, 30 January 2014 import subprocess backupEveryNumberDays = 5 home = '/home/paulgorman/' lastBackupFile = home + '.lastbackup' message = 'Turn on the backup hard drive, then run: sudo /root/bin/backupexternal' now = int(subprocess.check_output(['date', '+%s'])) f = open(lastBackupFile) lastBackup = int(f.read()) f.close if (now - lastBackup >= backupEveryNumberDays * 86400): subprocess.check_output(['wall', message]) subprocess.check_output(['xmessage', message]) I still need to finish the script that mounts the external hard drive, and rsyncs to it. I also need to format the drive itself. Questions:

< ^ txt