Hello

Id is found with
sogo-tool restore -l USER /path/to/your/sogotool/backup

It will list all IDs and names in brackets for all calendars and address
books.

Example:
# /usr/sbin/sogo-tool restore -l tempbackup/ testUser
<0x0x55f73d6eee40[SOGoCache]> Cache cleanup interval set every
900.000000 seconds
<0x0x55f73d6eee40[SOGoCache]> Using host(s) 'local-databasehost' as
server(s)
2020-08-19 09:27:30.756 sogo-tool[21719:21719] Restorable folders:
2020-08-19 09:27:30.757 sogo-tool[21719:21719]
Calendar/3D13-5DE14580-1-B7CA5B0 (PickWick)
2020-08-19 09:27:30.757 sogo-tool[21719:21719]
Calendar/3D15-5DE14500-1-6AD03780 (Superduper)
2020-08-19 09:27:30.757 sogo-tool[21719:21719]
Calendar/414-5E621180-1-3C017840 (MasterSend)
2020-08-19 09:27:30.757 sogo-tool[21719:21719]   Calendar/personal
(Persönlicher Kalender)
2020-08-19 09:27:30.757 sogo-tool[21719:21719]
Contacts/4B2A-5E160E00-1-11226C60 (Privileged-Book)
2020-08-19 09:27:30.757 sogo-tool[21719:21719]
Contacts/4B30-5E21A280-19-24145C00 (somethingTp Test)
2020-08-19 09:27:30.757 sogo-tool[21719:21719]   Contacts/collected
(Gesammelte Adressen)
2020-08-19 09:27:30.757 sogo-tool[21719:21719]   Contacts/personal
(Persönliches Adressbuch)

So for calendar "Persönliches Adressbuch" you get ID "Contacts/personal".
No need to access database by hand ;-)


Kind regards,
Christian Mack

Am 18.08.20 um 20:18 schrieb "Sam W. Klambour" (klamb...@macsmb.com):
> Thanks Marcus, but cadaver was last updated 2009. So I was looking for
> some other tools.
> Turned out SOGo has its own tool:*
> 
> 1)* I have had the following idea:
> 
> *sogo-tool -v truncate-calendar  an...*
> 
> Usage: truncate-calendar USER FOLDER DATE
> 
>          USER       the owner of the calendar folder
>          FOLDER     the *id of the folder* to clean up
>          DATE       UTC datetime - non-recurring events older than this
> date will be removed (ex: "2016-06-27T17:38:56")
> 
> 
> *2)* So, I was looking for this folder ID:
> 
> mysql  -u root -p
> show databases;
> use sogo;
> show tables;
> SELECT * FROM sogo_folder_info
> 
> +-------------+----------
> | c_folder_id | c_path
> +-------------+----------
> |           1 | /Users/ma
> |           2 | /Users/ma
> |           3 | /Users/an...
> | *4* | /Users/an
> ...
> 
> |          15 | /Users/an
> |          19 | /Users/ha
> |          21 | /Users/ad
> +-------------+----------
> 
> 
> *3) *I then again run the truncate command
> 
> sogo-tool -v truncate-calendar an... *4* 2020-08-18T20:01:56
> Folder '4' of user 'an...' not found.
> 
> 
> 
> *4) *What is wrong with folder id 4?
> Am I wrong to look for this ID in the sogo mysql database?
> 
> 
> Any help appreciated.
> Sam W. Klambour
> 
> 
> Zentyal
> 
> Sam W. Klambour
> 
> Business Developer Zentyal macSERVER
> 
> sklamb...@zentyal.com <mailto:sklamb...@zentyal.com>
> 
> macser...@zentyal.com <mailto:macser...@zentyal.com>
> 
> www.zentyal.com <https://zentyal.com>
> 
> 
> On 2020/08/18 15:04, Marcus MERIGHI (mcmer-s...@tor.at) wrote:
>> Hello,
>>
>> Am 17.08.20 um 15:05 schrieb "Sam W. Klambour" (klamb...@macsmb.com):
>>> *Question 2:*
>>> If there is no way to delete this initial calendar, how can one
>>> delete/remove all items of this caleandar, in order to get back a
>>> pristine default calendar?
>> you could connect to your SOGo instance [1] with a caldav client like
>> cadaver[2]. It is akin to a command line ftp client, including delete.
>> A simple "rm *" might do.
>>
>> I seem to remember that thunderbird/lightning has a list view, which
>> might allow to select all entries and delete them all at once.
>>
>> [1] https://your.server:port/SOGo/dav/
>> [2] http://www.webdav.org/cadaver/
>>
>> Marcus
> 


-- 
Christian Mack
Universität Konstanz
Kommunikations-, Informations-, Medienzentrum (KIM)
Abteilung IT-Dienste Forschung und Lehre
78457 Konstanz
+49 7531 88-4416

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to