Closed sizzlingapple closed 5 years ago
Unfortunately, I am not very experienced with ldap. I just installed a ldap-server to one of my testing instances, but could not reproduce the issue. I need your help to debug.
I am taking user cb3e0866-d5b6-1037-8478-fb9428484cf6
as example, as it looks like it is one of the users, where the problem occurs (of course you could choose another user, if you prefer).
Do you have access to the Nextcloud database? Could you:
cb3e0866-d5b6-1037-8478-fb9428484cf6
?[PREFIX]calendars
where in field principaluri
the value [ANOTHER_PREFIX]cb3e0866-d5b6-1037-8478-fb9428484cf6
is found. [ANOTHER_PREFIX] is usually principals/users/
, but I suspect this might be different for existing ldap-users. Note value id
of that line which is needed for step-3.[PREFIX]calendarobjects
there are entries where calendarid
is matching the id
from the line of step-2. Could you posts the value of the field calendardata
from one of those lines?Of course you should anonymize data (or create a new calendar/-entry with dummy values)
Im not really good with databases but I tried to get the stuff you need, if its wrong i'l try again :)
Of course you should anonymize data (or create a new calendar/-entry with dummy values) The weird thing is that if I create a new calendar I don't have the problem even with the same user from ldap.
I need to compare the database entries from a newly created calendar (which is found by calcardbackup) and an old calendar (which is not found by calcardbackup) from the very same user of ldap.
Therefore, could you create a new calendar for this user and post the output of this mysql-command:
SELECT calendarcolor, id, principaluri, uri, displayname FROM ncu_calendars WHERE principaluri = 'principals/users/cb3e0866-d5b6-1037-8478-fb9428484cf6';
It would be best to post the output as a code block with triple backticks (to make sure that there are no linebreaks in the mysql result)
"sudo -u www-data ./calcardbackup "/var/www/nextcloud"
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+ Mon Apr 1 20:55:27 UTC 2019 --> START calcardbackup ver. 0.8.7 (20.03.2019), AGPL-3.0
+ Checking dependencies and preparing...
+ no usersfile given: will backup all available items
+
+ Using URL: https://example.org
+ no valid status.php found at https://example.org.
+ Nextcloud 15.0.5 detected.
+ Database of chosen Nextcloud installation is MySQL/MariaDB.
+ Looking for calendars in your Nextcloud:
+ saving calendar REDACTED-Personal.ics (from database)......success!
+ saving calendar 5186a584-55b1-1038-9c51-b125d912bbcd-Jodl.ics (from database)......success!
**+ saving calendar cb3e0866-d5b6-1037-8478-fb9428484cf6-calcardbackup-test.ics (from database)......success!**
+ Looking for calendarsubscriptions in your Nextcloud:
+ No calendarsubscriptions found.
+ Looking for addressbooks in your Nextcloud:
+ saving addressbook REDACTED-Contacts.vcf (from database)......empty file. Addressbook 'Contacts' of user 'REDACTED' is empty.
+ saving addressbook cb3e0866-d5b6-1037-8478-fb9428484cf6-Contacts.vcf (from database)......empty file. Addressbook 'Contacts' of user 'cb3e0866-d5b6-1037-8478-fb9428484cf6' is empty.
***
SAME MESSAGE
***
+ saving addressbook 5d766aba-a5bb-1037-8940-e3222c59b1f9-REDACTED.vcf (from database)......success!
+ Compressing backup as *.tar.gz file. Be patient - this may take a while.
+ Backup successfully compressed!
+ Find your backup here: /backup/calcardbackup/backups/calcardbackup-2019-04-01.tar.gz
+ Mon Apr 1 20:55:29 UTC 2019 --> END calcardbackup
+
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SELECT calendarcolor, id, principaluri, uri, displayname FROM oc_calendars WHERE principaluri = 'principals/users/cb3e0866-d5b6-1037-8478-fb9428484cf6';
thanks for the help with the sql query
SELECT calendarcolor, id, principaluri, uri, displayname FROM oc_calendars WHERE principaluri = 'principals/users/cb3e0866-d5b6-1037-8478-fb9428484cf6';
+---------------+----+-------------------------------------------------------+--------------------+--------------------+
| calendarcolor | id | principaluri | uri | displayname |
+---------------+----+-------------------------------------------------------+--------------------+--------------------+
| #CC317C | 26 | principals/users/cb3e0866-d5b6-1037-8478-fb9428484cf6 | calcardbackup-test | calcardbackup-test |
| #9DA6A8FF | 4 | principals/users/cb3e0866-d5b6-1037-8478-fb9428484cf6 | personal | REDACTED |
+---------------+----+-------------------------------------------------------+--------------------+--------------------+
2 rows in set (0.00 sec)
Thanks, I think I found the problem:
the calendarcolor of the personal
-calendar looks like it has to many characters (it should be #RRGGBB
, but it is #RRGGBBXX
).
Commit ba6af7973374b2e628624d2a34189167b7cec576 makes calcardbackup tolerate calandercolors with more (or less) than 7 characters. This is also what sabre-davs calendar-export function does.
Can you check whether ba6af7973374b2e628624d2a34189167b7cec576 solves the issue for you?
thanks the fix works perfectly. All calendars are seen. The issue is solved.
Any way I can donate to you for a beer or coffee?
Fixed in v0.8.8
Any way I can donate to you for a beer or coffee?
Thanks that is very kind of you, but not necessary. I appreciate it!
Infos: Ubuntu 18.04 Server User are synched from LDAP Server Nextcloud 15.0.5 (just updated from 15.0.2 didn't work there neither) MariaDB 10.1.38
Problem: Doesn't backup calendars of existing users/calendars. Backup of admin calendar works without a problem, it also sees the users (I assume) because of the empty adressbook it finds.
Tests: If I create a new calendar within a user it sees it "...test-cal-shared.ics" If I create a new user in LDAP and then create a calendar it also works "...Jodl.ics" script is executed with "sudo -u www-data ./calcardbackup "/var/www/nextcloud" also tried with "sudo -u www-data ./calcardbackup "/var/www/nextcloud -u users.txt -z" "sudo -u www-data ./calcardbackup "/var/www/nextcloud -u users.txt -i"
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++