General discussion on installation and configuration of SOGo

Text archives Help


Re: [SOGo] Extracting address books and calendars content


Chronological Thread 
  • From: André Rodier ( ) < >
  • To:
  • Subject: Re: [SOGo] Extracting address books and calendars content
  • Date: Thu, 13 Jun 2019 10:19:00 +0100
  • Dmarc-filter: OpenDMARC Filter v1.2.0 mail.inverse.ca D3E311DE5104

> Am 12.06.19 um 19:18 schrieb André Rodier
> ( ):
> > Hello, wonderful SOGo team,
> >
> > I need a way to export and import an address book, and maybe a
> > calendar, from the command line.
> >
> > I am interested even if your answer is partial, for instance just the
> > export. The bare minimum would be exporting an address book in a text
> > file, in any appropriate format.
> >
> > I am happy to write SQL as well if this is necessary, although I would
> > prefer use the http protocol.
> >
> > Also, can I restore, still using the command line, the user's data from
> > a SOGo backup, or the whole database is the way to go.
> >
> > Thanks a lot for your hard work, this is great, and thanks to you and
> > Debian, my project is taking shape.
> >
> > Thanks a lot for your hard work and your insights.
>
> On Wed, 2019-06-12 at 21:43 +0200, Anselm Martin Hoffmeister wrote:
> Hallo André,
>
> I guess that CALDAV is the way to go (via HTTPS, preferrably). There are
> php snippets that demonstrate Web DAV accesses, for example, so you
> could "roll your own", for both data read and write, and have full
> flexibility to access single items, while keeping sogo happy with
> synchronizing changed data to whichever user/program/device needs it.
> For mere backups though, the SQL database dump would be the obvious choice.
>
> I admit that for a certain purpose I was a bit lazy and used a database
> dump: We need a plain csv file of phone number and associated names for
> our PABX to display caller names. There is some script that I will not
> disclose (as it is not pretty at all), but it is fed with the output of
>
> echo "SELECT c_content FROM sogoanshoffm00112288562" | mysql -u
> sogodbuser thesogodb | parsevcardscript
>
> where the table name has been hand-picked, obviously, and the mysql uses
> an options file (which contains the password in this case).
>
> The data is - you may have guesses - in vcard format, which to me seems
> like the shabby brother of an LDAP record - it seems to have been kind
> of a standard for some time, or rather, a set of "we use it like this"
> that are mostly compatible. Don't trust much on any application to
> behave, and with a large range of software and devices accessing your
> sogo, you will for example have several TEL;TYPE= and EMAIL;TYPE=
> variants that not every program uses in the same way. YMMV.
>
> For restoring the complete dataset, I had to do this with several SOGo
> instances a while back when changing hardware, and on that occasion
> doing a full software install instead of just moving the root partition.
> Just shutting down sogo, exporting the database, importing on the new
> server and firing up sogo there with the mostly identical config file
> worked as expected.
>
> Best regards
> Anselm

Hello Anselm,

Thanks for your help.

The final purpose is to backup and restore SOGo from scratch, so maybe
I will end up restoring the whole database.

Nothing in the method above seems appropriate for me.

Since I want to do the backup on the local machine, http or https is
not very relevant. What is more, however, is that I need some "special"
account, with read access to all user's address books and calendars,
and I did not find anything close to this in the documentation.

Thanks,
André

--
André Rodier
HomeBox: https://github.com/progmaticltd/homebox



Archive powered by MHonArc 2.6.18.

Top of page