Unfortunately i messed up my Nextcloud installation. I had to set up a new one.
The major problem now is that I lost the calendar data. Well, I didn’t completely lose it, it’s still in the database of the old installation.
I have access to the database and I was browsing through the calendar tables. But I was not ablel to find “human readable” entries so that I would be able to manually transfer the data.
However, what is the best way to extract the calendar data from the DB?
Well… one could probably at least export the contents of teh calendars from the old database. There are four tables which are holding the calendars:
oc_calendars, which denotes all the calendars in the db. From there you will get the IDs, which you need to export the calendar entries from oc_calendarobjects, where there are the actual vevent objects.
In oc_calendarobjects, column ID and column calendardata should give you, what you want. Fire up some MySQL (or whatever DB you used to host the NC database) and use sql to extract your calendars into a txt file. Use that one to re-import your calendars back into your running NC instance.
Hi,
I ran into the same issue and need to restore two calendars from a backup.
Would you mind assisting with some sql specific knowledge?
I figured out what I have to:
start the backup database
I could do this the dirty way and simply substitute the db files from the running NC instance like described here.
Dump the required clendar tables
What’s the syntax and how to find out which tables are the right ones?
You could use my script calcardbackup after firing up the old database to pull the two calendars from the old database and reimport them to the new installation. No need to fiddle around in the database then.
Have a look in the README of the repository for the section “does this work with a broken instance”.
If you mess up the password in the config file for any reason, you can type it in PLAIN TEXT if you remove the 'passwordsalt' line from the config.php file