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: https://github.com/ccoenen/nextcloud-gitexport
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
- clone this repository
config.ymlto 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
- create a
contactsdirectory (or, alternatively, point the config to your desired contacts location)
git initin that location
Whenever you feel like it you can run the script like this
cd your-owncloud-pim-clone ./owncloud-pim-backup
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'
This is free software, released under MIT License. Use at your own risk.