I use Nokia's Mail for Exchange app to sync my phone calendar with my Google calendar. This has worked great for years, but recently I've experienced some data loss. Not good. My entire calendar would disappear.
I'm not sure what is triggering this, but in the meantime I've decided that I really need a backup system for this important data. This little script will do the job I think:
#!/bin/bash
cd /home/mike/Documents/gcal
url=https://www.google.com/calendar/ical/ADDRESS/private-SECRET/basic.ics
wget -O - "$url" |grep -v "^DTSTAMP:" >basic.ics
git commit -a -v -m sync
I'm currently running this hourly via cron