HELP: my addressbook is gone

Nextcloud version (eg, 20.0.5): 23.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.52
PHP version (eg, 7.4): 7.4.28

I have 5 Nextcloud instances on that host and many users on each of them. For my own user, the addresssbook is gone. When going to the settings on the contacts app, I get a message that import is not available because no addressbook is there:

2022-03-08_15-24

When I look into the database, the record for that use is present, like for all users as well:

mysql> select * from oc_addressbooks;
+----+----------------------------------+------------------------------------+------------------------------------------+-----------------------------------------------------------+-----------+
| id | principaluri                     | displayname                        | uri                                      | description                                               | synctoken |
+----+----------------------------------+------------------------------------+------------------------------------------+-----------------------------------------------------------+-----------+
|  1 | principals/system/system         | system                             | system                                   | System addressbook which holds all users of this instance |      1747 |
|  2 | principals/users/jurgenhaas      | Contacts                           | default                                  | NULL                                                      |      5600 |

I still have synced copies of all the contacts in Thunderbird and on my mobile (synced with DavX5), there are over 2000 contacts in them. But on the server they are gone. Address books for other users display just fine.

When I go to the database and try to list content oin the oc_cards table, I get a strange error there:

mysql> select * from oc_cards;
ERROR 2020 (HY000): Got packet bigger than 'max_allowed_packet' bytes

Not sure if that’s related. What can I do to cleanup that mess? Hope we can recover the data properly.

pls make sure that’s not something like in here…

deleting the overly big entry helped.

Thanks @JimmyKater I’ll have a look

1 Like

That was it, I had 4 contacts with carddata bigger than 30MB each. No idea where they came from, the images inside are 300KB in size, no idea why they turn into something 100 times bigger in the database. Deleting the images in Thunderbird and deleting the cards in MySQL, then syncing again, worked well and I still have all my contacts, just without those large images.

1 Like

I still don’t know where this mega-big entry came from, myself.

so it’s good that it helped.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.