How to Keep My Calendar After an Upgrade to New SD Card Installation

I’m running Nextcloud on a Raspberry Pi… works great!

Recently I wrote an image to a new SD card (that’s the official upgrade via Syncloud) and all my files and photos were back. It found my external drive… good to go!


The calendar was fresh and the settings wiped out everything on the phone for the same named calendar.

So I put back in the old SD card… and my calendar is back and everything is what it was before.


How can I now export this calendar so when I input that new SD card again… I can import this calendar?

Or is there some other way because the next time I connect to the new install, the WebDav connection will delete everything off my phone again.

For exporting you could use my script calcardbackup (I recommend with option -f|--fetch-from-database):

For importing to the new installation I would actually add a caldav Nextcloud-account to a client and then import the exported ics-file to the client and let the client sync the data to nextcloud. Importing directly to Nextcloud might lead to timeout issues due to the raspberry not being very fast. Depending on the size of the ics-file a direct import to Nextcloud might work without any problems though.

Good luck!