KOrganizer Calendar Data Location

Hello,

Today I was cleaning my calendars and accidentally deleted one of them. Fortunately I have a snapshot of my home directory from a few days ago, so I tried looking around in ~/.local/share and ~/.config but all I could find were some database files and the std.ics file.

By the way, I never gave that calendar a filename or URL. It was just called akonadi_ical_resource_XX.

Is there any chance I can restore this calendar?

That is just the name of the “backend connector”, in the case of a local calendar the file handler..

The actual data file is most likely the std.ics you’ve found

I have multiple ical files setup. And the std.ics file was just the default calendar, not the one I had accidentally deleted.

Ah, I see.

In your backup you should find a config file for the akonadi_ical_resource_XX you had.

Something like $HOME/.config/akonadi_ical_resource_XXrc

That should contain the path of the ics file it used as its storage.

For example I have a $HOME/.config/akonadi_ical_resource_2rc and it contains

[General]
Path[$e]=file://$HOME/.kde/share/apps/korganizer/std.ics

I did find a file in my config directory called akonadi_ical_resource_11rc

But it seems like since I never gave that calendar a filename, there’s no Path value, only a DisplayName

Hmm, I guess we have run into a bug.

The configuration for a file based calendar is incomplete without a path, so this should not have been able to “complete” the setup steps.

I have just tried this myself and I can get such a “calendar without storage” and it even accepts events being added to it.

My expectation would have been that this calendar is “disabled” (in internal terms “offline”) until it can actually store events.

Because any event added to such a calendar is essentially “in transit” (in a temporary file or the cache database) and not really accessible without running the system.

So I would say we’ve even encountered two bugs:

  1. KOrganizer should not allow to add an ical file calendar without path
  2. The ical file resource should not allow new entries if it has no path in its config

Do you think you could report those at https://bugs.kde.org/ and report the ticket numbers here?

Bug 1 is likely for product “KOrganizer”, component “general”
Bug 2 is likely for product “Akonadi”, component “ical file resource”

Ah, I see.

I’ll report those bugs soon and post the tickets here as you said.

Does this mean the data is lost?

Here are the ticket numbers:

Korganizer bug: 502024
Akonadi bug: 502025

1 Like

If you can run the system with the snap shot as the “current” state then you can just access the data through KOrganizer and move it to a new calendar that has an associated file.

In your current state you have already deleted the calendar, so all cache data associated with it should ideally have been purged.
Only the actual file, if it had had one, would have remained.

1 Like

Great, thanks!

I am currently not actively participating in development but I did a bit of digging in the code and added some (hopefully helpful) comments to the tickets :slight_smile:

I just restored the snapshot and exported the calendar and now all my data is back!

Thank you!

1 Like