Kopano: Import of contacts and notes

Hi,
at first, sorry maybe I overlooked this topic and it was already discussed, please answer with the link to this topic. :slight_smile:

I’ve set up the UCS for home use with Kopano, Let’s Encrypt and Nextcloud running.
I had already Zarafa on Debian machine, but I didn’t migrate. It was a completely new start because Zarafa was so so configured to save all attachments in the database. I didn’t want to mess something up, so I decided to start with a clean system. Therefore I saved all the calendars (***.ics), contacts (***.csv) and notes (***.csv).

I want to import my contacts and notes in Kopano.
I found for import of calendar this how-to: https://kb.kopano.io/display/WIKI/Importing+ICAL+.ics+files+into+Kopano
For my other family members not very “userfriendly”, but it’s only needed the first time so I will do it for them.

I found also this open unassigned topic since 18. Oct. 2016: Import e-mail, calendar and contacts
https://jira.kopano.io/browse/KW-611
Really?!? Is this requested so seldom? I think it’s a standard issue if you’re coming from another hoster. Then you want to import your contacts, calendars and emails in Kopano.

For Zarafa there was this contact importer app available for the WebApp:
https://community.zarafa.com/pg/plugins/project/20393/developer/h44z/webapp-contact-importer
Can I install and use it with Kopano?

Is it possible to import notes?

Or is it possible to import the contacts directly into the database or are there any other dependencies which should be considered?
If there are no dependencies: On which port the MariaDB is running in the UCS Kopano App? I can do mapping for the columns to the fields of the database.

Edit: Save the whole user store (emails, contacts, calendars, notes) in one *.pst file. And import it with kopano-import-pst.
(I used zarafa migration tool. https://forum.kopano.io/topic/309/export-pst-from-zarafa, because my Outlook chrashed multiple times, said every time “5 seconds remaining” for one hour.)

Best regards,
Pollux

Hi,

I would say the easy way would be through kopano-backup, I think you can run the latest kopano-backup alos on your Zarafa installation and then do restore on your new Kopano installation

for example:

kopano-backup -s ip-of-zarafa-server:237/zarafa -U adminUser -P Password-of Admin -O /BackupDestinaltion

rg
Christian

1 Like

We have a very powerful toolset on the commandline to interface with stores (through python-kopano). When doing mass imports no one want to put the pain on an admin to import a large number of users with even larger stores through a web application.

Yes, would recommend that as well.

Edit: example script to import data through python-kopano https://stash.kopano.io/projects/KC/repos/kopanocore/browse/swig/python/kopano/scripts/import_rfc.py

Ahh, OK. Thanks!

OK, kopano-backup would be the easy way.
If I backup my old zarafa database also the attachments in it will be saved in the backup and this backup I’m importing to kopano. Is there a option to not import the attachments (because these would blow up the new kopano database again)?
Am I wrong?
I saved all the emails from my family in a few *.pst files. These will then be bound/mounted in Thunderbird. That was my way/thinking.
Or should I delete all the old e-mails wit attachments in the zarafa-databasse and then save/backup this status with kopano-backup?

PS: I can also communicate in German, if you like.

BR
Pollux

+++ German +++
In der alten Zarafa-Datenbank wurde auch die Anhänge gespeichert, wenn ich diese nun sichere und in Kopano importiere, dann blase ich doch die neue Datenbank wieder auf, oder?
Gibt es eine Option die Anhänge nicht zu importieren?
Oder denke ich da falsch?
Sollte ich alle alten E-Mails mit Anhängen auf der Zarafa-Datenbank löschen (gesichert sind sie schon) und dann diesen Zustand sichern mit kopano-backup?

Grüße
Pollux

You are wrong - as the attachment setting is in server.cfg so if you have the default setting on the new installation as filesystem then on restore kopano-core saves the attachments in filesystem not in sqldb

How did you export to pst ? If you did with Outlook you should already have all in there (Mail, Contact, Calendar, Notes) - if this is the case you can ease import them on the new server with kopano-migration-pst tool directly on the server

rg
Christian

Ahh, so at the kopano import checks and attachments are then saved in the filesystem. Good!

OK, cool. I found it: https://documentation.kopano.io/kopano_migration_manual/pst_migration.html
I will try it (and give feedback :slight_smile: ). Thanks!

I’m really sorry, I can’t achieve this simple command. Is the kopano-migration-pst tool always delivered with kopano (Kopano Core 8.4.5.0, Kopano WebApp 3.3.0.610, Z-Push for Kopano 2.3.7) on UCS 4.2-3 errata310? Or do I have to install an additional package? Or do I have to change the directory (to the kopano install dir)?
Because I get the error: kopano-migration-pst: command not found.

# - command executed as user root
$ - command executed as a regular non-privileged user
---
# kopano-migration-pst --help
-bash: kopano-migration-pst: Kommando nicht gefunden.
# kopano-migration-pst -h
-bash: kopano-migration-pst: Kommando nicht gefunden.
# kopano-pst --help
-bash: kopano-pst: Kommando nicht gefunden.

I checked also kopano-migration-imap, same error.

# kopano-migration-imap --help
-bash: kopano-migration-imap: Kommando nicht gefunden.

I tried also kopano-backup, that’s available.

# kopano-backup --help
Usage: kopano-backup [PATH] [options]

Options:
  -h, --help                         show this help message and exit
  -c FILE, --config=FILE             load settings from FILE
  -s SOCKET, --server-socket=SOCKET  connect to server SOCKET
  -k FILE, --ssl-key=FILE            SSL key file
  -p PASS, --ssl-pass=PASS           SSL key password
  -U NAME, --auth-user=NAME          login as user
  -P PASS, --auth-pass=PASS          login with password
  -C NAME, --company=NAME            Specify company
  -u NAME, --user=NAME               Specify user
  -S GUID, --store=GUID              Specify store
  -f NAME, --folder=NAME             Specify folder
  -b DATE, --period-begin=DATE       Specify period
  -e DATE, --period-end=DATE         Specify period
  -l LEVEL, --log-level=LEVEL        set log level (CRITICAL, ERROR, WARNING,
                                     INFO, DEBUG)
  -w N, --worker-processes=N         number of parallel worker processes
  -O PATH, --output-dir=PATH         specify output directory
  --skip-junk                        skip junk folder
  --skip-deleted                     skip deleted items folder
  --skip-public                      skip public store
  --skip-attachments                 skip attachments
  --skip-meta                        skip metadata
  --only-meta                        only backup/restore metadata
  --deletes=YESNO                    store/restore deleted items/folders
  --purge=N                          purge items/folders deleted more than N
                                     days ago
  --restore                          restore from backup
  --restore-root=PATH                restore under specific folder
  --stats                            list folders for PATH
  --index                            list items for PATH
  --sourcekey=SOURCEKEY              restore specific sourcekey
  --recursive                        backup/restore folders recursively
  --differential                     create differential backup
  --merge                            merge differential backups

Its not installed by default, put part of the apps repository.

Hi,

you’ll have to install from packet manager in UCS:

grafik

rg
Christian

Hi Felix @fbartels,
Hi Christian @externa1,

Thank you very much! It works!
Import of E-Mails: :white_check_mark: Done.
Import of Contacts: :white_check_mark: Done.
Import of Calendar: :white_check_mark: Done.
Import of Notes: :white_check_mark: Done.

Best regards,
Pollux

2 Likes
Mastodon