You are here: Home / Debian GNU/Linux / System / Software / Backup Google Agenda on Debian

Backup Google Agenda on Debian

by Pierre-Yves Landuré last modified Dec 05, 2012 08:28

Google Agenda is very useful tool to synchronize an agenda between various users and hardwares. Synchronization errors can create lost, duplicated or edited events. This howto help to setup a frequent backup of Google Agenda. It ease the restoration of events in case of synchronization error.

This howto is tested on:

  • Debian 6.0 Squeeze


Install the Google Agenda backup script:

command wget "" \
--quiet --no-check-certificate --output-document='/usr/bin/backup-google-agenda'
command chmod +x '/usr/bin/backup-google-agenda'

Create the script configuration file:

command wget "" \
  --quiet --no-check-certificate --output-document='/etc/backup-google-agenda.conf'

Set up a cron task running the script every 6 hours:

echo "# Google Agenda backup
0 */6    * * *    root    test -x /usr/bin/backup-google-agenda && /usr/bin/backup-google-agenda
" > '/etc/cron.d/backup-google-agenda'

Reload cron:

/etc/init.d/cron reload


Add the agendas needing backup to the configuration file "/etc/backup-google-agenda.conf" with this format:

My agenda =


  • My agenda is the agenda name (any value is good)
  • is the private URL of the agenda XML or ICS file, available in the agenda parameters.

Run the backup to check for errors:

command backup-google-agenda

Caractéristiques des sauvegardes

The backup-google-agenda tool backup the agendas in both XML and ICS formats. The backups are stored in Backup Manager archives folder if Backup Manager is installed. If Backup Manager is not available, the agendas archives are stored in "/var/archives".

List the agenda backup archives (only for Backup Manager default configuration):

command find '/var/archives' -name '*-google_agenda*'

The archives are kept for 30 days. The script automatically delete the agenda backups older than that.

If Backup Manager export is enabled, the agendas archives are exported with the others Backup Manager archives.