A quick backup script for you tonight
I just got back from a great day at the Ubuntu Michigan LoCo edition of the Global Jam were we tested Lucid on a ton of different hardware. It was a great time. See the photos.
But, what I want to share with you right now is a quick script I whipped up to backup my Google Calendars nightly. This is one of the steps in my on-going process of making sure all of my personal data is backed up by me on machines I control with an eye to migrating to self (or friend) hosted services. Yes, I want services I use to follow the Franklin Street Statement.
Until the day that all of the services I use follow the Franklin Street Statement recommendations, I will just have to make sure I make personal backups of my information. So tonight, I finally did that for Google Calendars. It was pretty simple, really:
#!/bin/sh
# Backup my Google Calendars
WORK="/home/greg/backup/google/work-`date +%F`.ics"
PERSONAL="/home/greg/backup/google/personal-`date +%F`.ics"
OPENMICHIGAN="/home/greg/backup/google/open_michigan-`date +%F`.ics"
MILOCO="/home/greg/backup/google/miloco-`date +%F`.ics"
wget private_url_for_work_calendar -O $WORK
wget private_url_for_personal -O $PERSONAL
wget private_url_for_otherwork -O $OPENMICHIGAN
wget private_url_for_the_loco -O $MILOCO
# Remove files that are older than 1 week
find /home/greg/backup/google/*.ics -mtime +7 -exec rm -f {} \;
That’s it. Create the filenames for the various calendars I’m backing up, including today’s date. Then wget them. Then, delete any .ics file that is older than a week. Not sure why I need 7 days of backup, but better safe than sorry, I guess.


