Detailed OpenSync? Installation/Usage Example

Initial installation

First, download and install: OpenSync, the plugins you plan to use, and Multisync.

Check if everything is installed

Check if the plugins were installed correctly:

$ msynctool --listplugins
Available plugins:
file-sync
kdepim
evo2-sync
$

file-file synchornization

Create the group

$ msynctool --addgroup filefile
$

Add the file-sync members

$ msynctool --addmember filefile file-sync
$ msynctool --addmember filefile file-sync

The result should be:

$ msynctool --showgroup filefile
Groupname: filefile
Member 1: file-sync
Member 2: file-sync
$

Create the directories

In this example, we will use the directories sync1 and sync2 on the home directory. We will consider that the home directory is /home/joeuser. Please replace with the proper names.

$ mkdir ~/sync1
$ mkdir ~/sync2
$

Configure the members

Configuring the first member:

$ msynctool --configure filefile 1

This should open the vi text editor, where you can enter the configuration data for the member.

After opening the text editor, you should see a xml-file like this:

<config><path></path></recursive>FALSE</recursive></config>

now enter the directory path for the first member to that the config looks like this:

<config><path>/home/joeuser/sync1</path></recursive>FALSE</recursive></config>

Follow the same steps for the second member:

$ msynctool --configure filefile 2

And the configuration data should be:

<config><path>/home/joeuser/sync2</path></recursive>FALSE</recursive></config>

First test: empty directories

$ msynctool --sync filefile
Synchronizing group "filefile"
ERrro
Member 1 of type file-sync just connected
Member 2 of type file-sync just connected
Member 2 of type file-sync just sent all changes
Member 1 of type file-sync just sent all changes
All clients sent changes or error
Member 1 of type file-sync just disconnected
Member 2 of type file-sync just disconnected
All clients have disconnected
The sync was successfull
$

Second test: Add a sample vcard to the directory

Create a simple vcard file on ~/sync1. You can use you favorite PIM application to export some contacts to the vcard format.

To create a simple vcard file, you can type:

$ cat > ~/sync1/vcard1.vcf
BEGIN:VCARD
N:Test User
END:VCARD
<type Ctrl+D here>
$

Synchronize:

$ msynctool --sync filefile
Synchronizing group "filefile"
Member 1 of type file-sync just connected
Member 2 of type file-sync just connected
Member 2 of type file-sync just sent all changes
Received a entry vcard1.vcf without data from member 1. Changetype 1
Member 1 of type file-sync just sent all changes
All clients sent changes or error
Received a entry vcard1.vcf with data of size 96 from member 1. Changetype 1
Sent a entry vcard1.vcf of size 96 to member 2. Changetype 1
Member 1 of type file-sync just disconnected
Member 2 of type file-sync just disconnected
All clients have disconnected
The sync was successfull
$

The result should be:

$ ls ~/sync1
vcard1.vcf
$ ls ~/sync2
vcard1.vcf
$

It worked!

KDE-file synchronization

Create the group and members

$ msynctool --addgroup kdefile
$ msynctool --addmember kdefile kdepim
$ msynctool --addmember kdefile file-sync
$

Configure the members

See the session about member configuration above, on the file-file synchronization for more details.

The kdepim member don't need configuration. Just configure the second member (the file-sync member):

$ msynctool --configure kdefile 2

And on the configuration data opened on the editor, the directory name:

<config><path>/home/joeuser/sync1</path></recursive>FALSE</recursive></config>

Note: the directory specified here should exist before running the synchronization.

Synchronize

First, add some contacts to kaddressbook and some events on korganizer. You may want to use Kontact, that is a integrate PIM suite, to make things easier and open both kaddressbook and korganizer on the same application.

Then start the synchronization. Example:

$ msynctool --sync kdefile
Synchronizing group "kdefile"
Member 2 of type file-sync just connected
call failed
Member 1 of type kdepim just connected
Received a entry goufLxPhNp with data of size 190 from member 1. Changetype 1
<?xml version="1.0"?>
<note><Summary><Content></Content></Summary><Body><Content></Content></Body></note>
Received a entry toFOxhmYAO with data of size 244 from member 1. Changetype 1
Member 2 of type file-sync just sent all changes
Received a entry libkcal-311607955.636 with data of size 54 from member 1. Changetype 1
Member 1 of type kdepim just sent all changes
All clients sent changes or error
Sent a entry goufLxPhNp of size 4 to member 2. Changetype 1
Sent a entry toFOxhmYAO of size 4 to member 2. Changetype 1
Sent a entry libkcal-311607955.636 of size 4 to member 2. Changetype 1
Member 2 of type file-sync just disconnected
Member 1 of type kdepim just disconnected
All clients have disconnected
The sync was successfull
$ ls ~/sync1
goufLxPhNp  libkcal-311607955.636  toFOxhmYAO
$

Evolution 2 - file synchronization

There is a Evolution 2.0 - file synchronization page for information on synchronization between Evolution2 and file-sync.