Data loss after radicale server IP change & DAVx5 account conflict - any suggestions? #619
-
Hi, For many years, I've been using DAVx5 on my Android phone to automatically sync a few calendars and an address book to a radicale server on my laptop. This happens automatically whenever both devices are on my home LAN, which usually means: on a daily basis. I edit the calendars and address book exclusively on my phone rather than the laptop, so it took me a while before I realized today that the last sync to my laptop had - to my surprise - occurred many weeks ago. I then realized this was due to a recent WiFi router hardware upgrade, which had resulted in a new IP address for the laptop / radicale server, which DAVx5 was of course unaware of. I recalled from similar previous occasions that the IP address of an existing DAVx5 account cannot be changed after the fact (#23). Normally, what I would do in such a situation (IIRC) is to first remove the existing DAVx5 account for the radicale server with the outdated IP address, and then create a new one with the updated IP address. As I recall it, the existing calendars and contacts on the phone were unaffected by this, and any new calendar events & contacts created on the phone since the last sync would then reliably sync back to the radicale server via the newly created account - just as intended. Today, however - for whatever reason - I added the new DAVx5 account with the updated IP address without first removing the old account with the outdated IP. The result was that my calendars and address book on my Android phone suddenly looked very outdated; essentially all the edits I had made since the last sync many weeks ago were gone. Apparently, the only syncing that occurred was from the radicale server to the Android client rather than the other way around. So now I find myself with several weeks worth of lost calendar/contacts data and have the following questions:
I'm mostly just trying to understand the process, so I can prevent similar disasters from happening in the future. Thanks for any pointers! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
An attempt to answer my own question after finding this: https://www.davx5.com/faq/synchronization/change-base-url I now seem to recall that in that previous similar situation (i.e., IP address change of radicale server), I had actually manually changed the server's IP back to the old one, in order to perform a final sync using the old DAVx5 account, before then creating a new account with the updated IP. That's the ingredient I had missing today, and I'm guessing that's what resulted in my loss of recently created calendar events & contacts. Can somebody confirm this? Also, note that I do still have the old DAVx5 account with the outdated IP - could that contribute towards a data rescue effort, or is it just too late, now that the radicale server has synced back to the Android client via the new account? |
Beta Was this translation helpful? Give feedback.
-
A quick follow-up: Since I could not use the "Calendar Import-Export" app to export calendars from my Android client (due to them containing "0 events", as described above), I instead proceeded as suggested above: I got the radicale server and the Android client back onto their original IP subnet that the old DAVx5 account expected, in order to then successfully initiate a sync between the two. This, however, yielded the same result as originally described above for the first sync of the new DAVx5 account: My old calendar events and contacts were successfully restored from the radicale server to the Android client, but the most recent events and contacts remain lost, i.e., anything that was added on the Android client since the last sync of the old DAVx5 account to the radicale server that occurred a few weeks ago. To me this suggests that somewhere in steps 4-6 described in my last post, I did indeed lose this most recent data on the Android device (where the only copy of that data resided), but I'm still struggling to understand which step exactly is to blame. Perhaps step 6, the deletion of the new DAVx5 account, resulted in the deletion of the local Android calendar collections, and because they were identically named as on the old DAVx5 account, they were then gone despite the old account still "sitting there"? At the same time, I'm not sure whether identically named collections associated with two different DAVx5 accounts even get into each other's hair like that - would those even access the same memory/database space on Android? If anyone could shed some light on which step exactly might have triggered the data loss, that would certainly be appreciated as helpful towards the avoidance of similar incidents in the future. |
Beta Was this translation helpful? Give feedback.
-
Thanks, this is a very clear breakdown of what's going on behind the scenes. I think what most likely must have happened is that I deactivated the resource in DAVx5 and then pressed sync, as you describe above - ironically perhaps even in an effort to prevent further disastrous syncing to occur. Yes, hostnames... what a fantastic idea! If only different routers and protocols were handling them in a predictable and compatible manner (looking at you, Apple and .local). Switching between manufacturers is precisely what prompted me to use IPs instead of host names in the first place, IIRC. Anyway, now I know what (not) to do whenever I change routers, so thanks for all the time and effort to explain the nuts and bolts of it. |
Beta Was this translation helpful? Give feedback.
When you add events on Android they are all basically stored in the Android Calendar storage. It is the general database for events where all calendars apps read/write data to it. If you assign an event to the DAVx5 account, DAVx5 knows that it is responsible for syncing it from there. If you delete DAVx5 or when a resource is deactivated in the DAVx5 account (and press sync) the calendar bound to DAVx5 and thus all assigned entries get removed from this database (regardless of its sync status). It is a system process deleting all references to avoid leaving a mess. This is performed y the Android system not directly by DAVx5.
At some point this must have happened I guess since you got an…