Howto backup hosted nextcloud

In a hosted environment you ususally don’t have direct access to the database where calendars and contacts are stored.

And even when the provider has some sort of backup

  • you don’t really own it, because you can’t download it
    • e.g. you don’t can’t just migrate in case you are locked out for some reason
  • its an “all or nothing” story when it comes to restores
    • the whole instance/account is reset to some point in time
    • any change in between the last backup is effectively overwritten


Create a settings file ~/ (a commented example can be in the script help page with “-h”):
CALENDARS="acalendar bcalendar"

Run the scripts and ICS and VCF files are written to ~/mirror/

Downloading calender 'acalendar' ...
Downloading calender 'bcalendar' ...
Downloading addressbook 'contacts' ...
Download finished successfully