Tasks backup by using URLs

Hi,

I’m used to doing backups by using Nextcloud URL in a bash script.
E.g. remote.php/dav/addressbooks/users/nextcloud/Test/?export to export my contacts.

Would it be possible to do the same for Tasks? E.g. save all tasks in a folder by calling a specific endpoint?

Thanks,
Regards

1 Like

You can use the calendar endpoint for exporting tasks, because tasks are also stored as calendars in the database.

The link would be:
https://[SERVER]/remote.php/dav/calendars/[USERNAME]/[URI]?export

[URI] can be looked up in table ‘oc_calendars’ in your Nextcloud database (prefix might be different from ‘oc_’ in your installation).

I also wrote a bash script that exports calendars and addressbooks from Nextcloud and saves them as .ics file. Maybe that can do the work for you. See here:

2 Likes

Really thankful for this. I wish this feature (?export) were exposed via the GUI.