Skip to content
This repository has been archived by the owner. It is now read-only.
DISCONTINUED (see README) - Create a copy of your owncloud contacts and calendar events in a git directory
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This works nicely, but I'm not going to make many more changes here. I'm attempting a PHP-Rewrite in form of a Nextcloud App over here:

Owncloud PIM Backup

Backup tool to export your owncloud contacts to vcf-files, storing them in a git-controlled directory.

The output is very suitable for summary emails.


  • ruby 1.9 or later
  • bundler
  • git


  • clone this repository
  • run bundle install
  • copy config.yml.example to config.yml
  • change config.yml to contain your database information and desired from/to email addresses
  • find out the addressbook's id, this will be in the table oc_contacts_addressbooks, and put it into config.yml as well
  • create a contacts directory (or, alternatively, point the config to your desired contacts location)
  • run git init in that location


Whenever you feel like it you can run the script like this

cd your-owncloud-pim-clone

automated use

I run this script every night from a cronjob. Easy crontab:

# the actual calling of this script, every day at 04:00 in the night.
0 4 * * * bash -l -c 'cd your-owncloud-pim-clone; ./owncloud-pim-backup'

free software

This is free software, released under MIT License. Use at your own risk.

You can’t perform that action at this time.