I like to backup my Nextcloud calendars and addressbooks as *.ics/*.vcf files, because it is very easy to restore: just import the backed up *.ics/*.vcf file to the server or a client and the accidentally deleted data is back online.
calcardbackup downloads all available calendars/addressbooks from a Nextcloud instance as .ics/.vcf files. All downloaded files are then compressed to a single file with the current date in the filename.
calcardbackup is compatible with all currently released Nextcloud versions (and ownCloud >= 5.0) and has been tested under Debian, Ubuntu, FreeBSD, SunOS and Darwin. Shell access to the server is needed. But with the help of the included calcardbackup-wrapper.php it possibly can also be used in shared hosting environments without shell access.
The configuration is quite simple: in most cases the path to the Nextcloud directory sufficient. It is not necessary to run the script with root privileges - in its default configuration it only needs to have read access to Nextclouds configuration file config.php
. At no point any data leaves the server.
https://github.com/BernieO/calcardbackup
(donât use the repo at GitHub anymore as it is heavily outdated and contains some unfixed bugs!)
EDIT (17.01.2020): the repository moved to Codeberg:
https://codeberg.org/BernieO/calcardbackup
EDIT (06.05.2021): calcardbackup v2.0.0
might be able to run on your server even if you donât have shell access to the server. Check out the section âCan I use this without shell access to the server?â in the README of the repo.
Best wishes,
Bernie_O
Please note, that this text has been adapted several times to match the newest release of calcardbackup.