backup your ownCloud contacts via cron
If you ever wondered if there is a way to automatically backup your ownCloud contacts via cron here is the solution:
1 2 3 4 5 6 7 8 9 10 11 12 |
<?php date_default_timezone_set('Europe/Berlin'); error_reporting(E_ALL); $date = date('Y-m-d-h-i-s'); $user = 'your_owncloud_username'; $password = 'your_owncloud_password'; $cmd = "wget --no-check-certificate --user=".$user." --password=".$password." -O ".$date."_contacts_".$user.".vcf https://your.owncloud.tld/remote.php/carddav/addressbooks/".$user."/contacts?export"; $dump = exec(escapeshellcmd($cmd)); ?> |
You just need to fill in your credentials and modify the path to your ownCloud installation.
Posted in ownCloud
Comments Off on backup your ownCloud contacts via cron