Google Calendar ical Auto Backup Script

| No TrackBacks

Googleical.JPG
If you are heavy Google Calendar user, must always export your events file to backup.
The below shell script is modified from Cpanel Auto Backup.

#!/bin/sh
myical="basic"
store_dir="/home/test/icalbackup" # The backup file directory path in local ex. /home/test/test1
file_keep_day=10 # the days that backup files will be kept (default: 10 day)
T=`date '+%m-%d-%Y'` # system date format MM-DD-YYYY
TS=`date '+%m-%d-%Y-%H%M%S'` # system date format MM-DD-YYYY-HhMinSS
#clean the files before $file_keep_day days
find $store_dir -name '*' -mtime +$file_keep_day | /usr/bin/xargs rm -f {}

#Google Calendar Backup -- add the time stamp in the tail of file
wget http://www.google.com/calendar/ical/yourname%40gmail.com/private-code/$myical.ics --no-check-certificate -O $store_dir/$myical-$TS.isc


Change yourname to Google Account name and private-code that you can see this code from your calendar setting.

No TrackBacks

TrackBack URL: http://server.everfine.com.tw/blog/mt-tb.cgi/232

February 2012

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Archives

Powered by Movable Type 4.34-en

About this Entry

This page contains a single entry by philipz published on February 24, 2009 12:43 PM.

登上雜誌封面 was the previous entry in this blog.

隨身碟修復方法 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.