SYNCEVOLUTION(1) | SYNCEVOLUTION(1) |
SyncEvolution - synchronize personal information management data
syncevolution --remove|--migrate <options> [--] <config>
This text explains the usage of the SyncEvolution command line.
SyncEvolution synchronizes personal information management (PIM) data such as contacts, appointments, tasks and memos using the Synthesis sync engine, which provides support for the SyncML synchronization protocol.
SyncEvolution synchronizes with SyncML servers over HTTP and with SyncML capable phones locally over Bluetooth (new in 1.0). Plugins provide access to the data which is to be synchronized. Binaries are available for Linux desktops (synchronizing data in GNOME Evolution, with KDE supported indirectly already and Akonadi support in development), for MeeGo (formerly Moblin) and for Maemo 5/Nokia N900. The source code can be compiled for Unix-like systems and provides a framework to build custom SyncML clients or servers.
This used to be called "data source" or just "source", which is a term still found in older documentation, some file paths and the source code of SyncEvolution.
Sync configs can be used to initiate a sync (like contacting a SyncML server) or to handle an incoming sync request (when acting as SyncML server which is contacted by the peer).
If the peer supports SyncML as sync protocol, a sync only uses one sync config on the SyncEvolution side. If the peer supports data access via some other protocols, then SyncEvolution can make that data available via SyncML and run a sync where SyncML is used internally. Such a sync involves two sync configs, see originating config and target config.
A sync config can use all datastores defined in the same context (see below). Some properties of the datastore can be set differently for each peer and thus sync config (per-peer). One of these, the sync property, defines if and how a datastore is used during a sync.
Typically each context represents a certain set of related datastores. For example, normally the @default context is used for local databases. Datastores related to a certain peer can be defined in a context @peer-name named after that peer.
These sets of properties are addressed via the main config name (a sync config name with or without an explicit context, or just the context name) and optionally the datastore name (if the properties are for a specific datastore).
Sync properties are set for sync configs, independently of a particular datastore. Properties that cannot be set without specifying they datastore that they apply to are datastore properties. This includes properties that belong both to a datastore and a sync config.
The property names were chosen so that they are unique, i.e., no sync property has the same name as a datastore property. For historic reasons, internally these properties are treated as two different sets and there are two different command line options to query the list of sync resp. datastore properties.
Some configuration properties are shared between configurations automatically. This sharing is hard-coded and cannot be configured. It has the advantage that certain settings only need to be set once and/or can be changed for several different configs at once.
A property can be unshared (has separate values for each peer, therefore sometimes also called per-peer; for example the sync property), shared (same value for all peers; for example the database property for selecting the local database) or global (exactly one value).
Together with the distinction between sync and datastore properties, this currently results in five different groups of properties:
Many properties have reasonable defaults, either defined in the configuration layer or chosen at runtime by the SyncEvolution engine reading the configuration, and therefore do not have to be set.
The configuration layer in SyncEvolution has a very limited understanding of the semantic of each property. It just knows about some generic types (strings, boolean, integers, ...) and where properties are supposed to be stored. It is the layer above that, the one which actually tries to use the configuration, that determines whether the property values make sense as specified. Beware that it is possible to set properties to values that conflict with other property values (triggering errors when using the configuration) or to set properties that are not used (typically they get ignored silently, unless an explicit error check was implemented).
A template only contains unshared properties. Therefore it is possible to first set shared properties (for example, choosing which databases to synchronize in the default context), then add sync configs for different peers to that context without reseting the existing settings.
In SyncEvolution's predefined configuration templates, the following names for datastores are used. Different names can be chosen for datastores that are defined manually.
In a so called local sync, SyncEvolution acts as SyncML server and client at the same time, connecting the two sides via internal message passing. Both sides have their own set of datastores, which may use CalDAV, CardDAV or ActiveSync to access the data.
See Synchronization beyond SyncML.
The <config> and the <store> strings in the command line synopsis are used to find the sync resp. datastore configs. Depending on which other parameters are given, different operations are executed.
The <config> string has the format [<peer>][@<context>]. When the context is not specified explicitly, SyncEvolution first searches for an existing sync configuration with the given <peer> name. If not found, the configuration can only be created, but not read. It will be created in the @default context as fallback. The empty <config> string is an alias for @default.
The <peer> part identifies a specific sync or target config inside the context. It is optional and does not have to be specified when not needed, for example when configuring the shared settings of datastores (--configure @default addressbook) or accessing items inside a datastore (--print-items @work calendar).
Listing datastores on the command line limits the operation to those datastores (called active datastores below). If not given, all datastores enabled for the config are active. Some operations require the name of exactly one datastore.
Properties are set with key/value assignments and/or the --sync/store-property keywords. Those keywords are only needed for the hypothetical situation that a sync and datastore property share the same name (which was intentionally avoided). Without them, SyncEvolution automatically identifies which kind of property is meant based on the name.
A <property> assignment has the following format:
[<store>/]<name>[@<context>|@<peer>@<context>]=<value>
The optional <context> or <peer>@<context> suffix limits the scope of the value to that particular configuration. This is useful when running a local sync, which involves a sync and a target configuration. For example, the log level can be specified separately for both sides:
--run loglevel@default=1 loglevel@google-calendar=4 google-calendar@default
A string without a second @ sign inside is always interpreted as a context name, so in contrast to the <config> string, foo cannot be used to reference the foo@default configuration. Use the full name including the context for that.
When no config or context is specified explicitly, a value is changed in all active configs, typically the one given with <config>. The priority of multiple values for the same config is more specific definition wins, so <peer>@<context> overrides @<context>, which overrides no suffix given. Specifying some suffix which does not apply to the current operation does not trigger an error, so beware of typos.
Datastore properties can be specified with a <store>/ prefix. This allows limiting the value to the selected datastore. For example:
--configure "addressbook/database=My Addressbook" \
"calendar/database=My Calendar" \
@default addressbook calendar
Another way to achieve the same effect is to run the --configure operation twice, once for addressbook and once for calendar:
--configure "database=My Addressbook" @default addressbook --configure "database=My Calendar" @default calendar
If the same property is set both with and without a <store>/ prefix, then the more specific value with that prefix is used for that datastore, regardless of the order on the command line. The following command enables all datastores except for the addressbook:
--configure addressbook/sync=none \
sync=two-way \
<sync config>
syncevolution --print-databases [<properties>] [<config> <store>]
If no additional arguments are given, then SyncEvolution will list all available backends and the databases that can be accessed through each backend. This works without existing configurations. However, some backends, like for example the CalDAV backend, need additional information (like credentials or URL of a remote server). This additional information can be provided on the command line with property assignments (username=...) or in an existing configuration.
When listing all databases of all active datastores, the output starts with a heading that lists the values for the backend property which select the backend, followed by the databases. Each database has a name and a unique ID (in brackets). Typically both can be used as value of the 'database' property. One database might be marked as default. It will be used when database is not set explicitly.
When selecting an existing datastore configuration or specifying the backend property on the command line, only the databases for that backend are listed and the initial line shows how that backend was selected (<config>/<store> resp. backend value).
Some backends do not support listing of databases. For example, the file backend synchronizes directories with one file per item and always needs an explicit database property because it cannot guess which directory it is meant to use.
syncevolution --create-database [<properties>] [<config> <store>]
Creates a new database for the selected backend, using the information given in the database property. As with --print-databases, it is possible to give the properties directly without configuring a datastore first.
The interpretation of the database property depends on the backend. Not all backends support this operation.
The EDS backend uses the value of the database as name of the new database and assigns a unique URI automatically.
syncevolution --remove-database [<properties>] [<config> <store>]
Looks up the database based on the database property (depending on the backend, both name and a URI are valid), then deletes the data. Note that datastore configurations using the database are not removed.
syncevolution <config>
Without the optional list of datastores, all datastores which are enabled in their configuration file are synchronized.
syncevolution <config> <store> ...
Otherwise only the ones mentioned on the command line are active. It is possible to configure datastores without activating their synchronization: if the synchronization mode of a datastore is set to disabled, the datastore will be ignored. Explicitly listing such a datastore will synchronize it in two-way mode once.
Progress and error messages are written into a log file that is preserved for each synchronization run. Details about that is found in the Automatic Backups and Logging section below. All errors and warnings are printed directly to the console in addition to writing them into the log file. Before quitting SyncEvolution will print a summary of how the local data was modified. This is done with the synccompare utility script described in the Exchanging Data section.
When the logdir property is enabled (since v0.9 done by default for new configurations), then the same comparison is also done before the synchronization starts.
In case of a severe error the synchronization run is aborted prematurely and SyncEvolution will return a non-zero value. Recovery from failed synchronization is done by forcing a full synchronization during the next run, i.e. by sending all items and letting the SyncML server compare against the ones it already knows. This is avoided whenever possible because matching items during a slow synchronization can lead to duplicate entries.
After a successful synchronization the server's configuration file is updated so that the next run can be done incrementally. If the configuration file has to be recreated e.g. because it was lost, the next run recovers from that by doing a full synchronization. The risk associated with this is that the server might not recognize items that it already has stored previously which then would lead to duplication of items.
syncevolution --configure <options for configuration> <config> [<store> ...]
Options in the configuration can be modified via the command line. The <config> and the optional <store> parameters define what gets created or modified. The remaining parameters define which values get set or modified.
To change settings of specific datastores, either invoke syncevolution multiple times with exactly one <store> parameter or use the [<store>/] prefix described above for property assignments.
syncevolution --remove <config>
Deletes the configuration. If the <config> refers to a specific peer, only that peer's configuration is removed. If it refers to a context, that context and all peers and datastores defined inside it are removed.
Note that there is no confirmation question. Neither local data referenced by the configuration nor the content of log dirs are deleted.
syncevolution --run <options for run> <config> [<store> ...]
Options can also be overridden for just the current run, without changing the configuration. In order to prevent accidentally running a sync session when a configuration change was intended, either --configure or --run must be given explicitly if options are specified on the command line.
syncevolution --status <config> [<store> ...]
Prints what changes were made locally since the last synchronization. Depends on access to database dumps from the last run, so enabling the logdir property is recommended.
syncevolution --print-servers|--print-configs|--print-peers syncevolution --print-config [--quiet] <config> [main|<store> ...] syncevolution --print-sessions [--quiet] <config>
These commands print information about existing configurations. When printing a configuration a short version without comments can be selected with --quiet. When datastores are listed, only their configuration is shown. Main instead or in combination with datastores lists only the main peer configuration.
syncevolution --restore <session directory> --before|--after
[--dry-run] <config> <store> ...
This restores local data from the backups made before or after a synchronization session. The --print-sessions command can be used to find these backups. The datastore(s) have to be listed explicitly. There is intentionally no default, because as with --remove there is no confirmation question. With --dry-run, the restore is only simulated.
The session directory has to be specified explicitly with its path name (absolute or relative to current directory). It does not have to be one of the currently active log directories, as long as it contains the right database dumps for the selected datastores.
A restore tries to minimize the number of item changes (see section Item Changes and Data Changes). This means that items that are identical before and after the change will not be transmitted anew to the peer during the next synchronization. If the peer somehow needs to get a clean copy of all local items, then use --sync refresh-from-local in the next run.
syncevolution --print-items <config> <store> syncevolution [--delimiter <string>] --export <dir>|<file>|- [<config> [<store> [<luid> ...]]] syncevolution [--delimiter <string>|none] --import <dir>|<file>|- [<config> <store>] syncevolution --update <dir> <config> <store> syncevolution [--delimiter <string>|none] --update <file>|- <config> <store> <luid> ... syncevolution --delete-items <config> <store> (<luid> ... | *)
Restore depends on the specific format of the automatic backups created by SyncEvolution. Arbitrary access to item data is provided with additional options. <luid> here is the unique local identifier assigned to each item in the datastore, transformed so that it contains only alphanumeric characters, dash and underscore. A star * in --delete-items selects all items for deletion. There are two ways of specifying luids: either as additional parameters after the config and datastore parameters (which may be empty in this case, but must be given) or after the --luids keyword.
<config> and <store> may be given to define the database which is to be used. If not given or not refering to an existing configuration (which is not an error, due to historic reasons), the desired backend must be given via the backend property, like this:
syncevolution --print-items backend=evolution-contacts syncevolution --export - backend=evolution-contacts \
--luids pas-id-4E33F24300000006 pas-id-4E36DD7B00000007
The desired backend database can be chosen via database=<identifier>. See --print-databases.
Here is a full description of all <options> that can be put in front of the server name. Whenever an option accepts multiple values, a question mark can be used to get the corresponding help text and/or a list of valid values.
Warning: local is the data accessed via the sync config directly and remote is the data on the peer, regardless where the data is actually stored physically.
If no such configuration exists, then a new one is created using one of the template configurations (see --template option). Choosing a template sets most of the relevant properties for the peer and the default set of datastores (see above for a list of those). Anything specific to the user (like username/password) still has to be set manually.
When creating a new configuration and listing datastores explicitly on the command line, only those datastores will be set to active in the new configuration, i.e. syncevolution -c memotoo addressbook followed by syncevolution memotoo will only synchronize the address book. The other datastores are created in a disabled state. When modifying an existing configuration and datastores are specified, then the datastore properties of only those datastores are modified.
By default, creating a config requires a template. Datastore names on the command line must match those in the template. This allows catching typos in the peer and datastore names. But it also prevents some advanced use cases. Therefore it is possible to disable these checks in two ways:
- use `--template none` or - specify all required sync and datastore properties that are normally
in the templates on the command line (syncURL, backend, ...)
The switch can also be used to migrate a configuration in the current configuration directory: this preserves all property values, discards obsolete properties and sets all comments exactly as if the configuration had been created from scratch. WARNING: custom comments in the configuration are not preserved.
--migrate implies --configure and can be combined with modifying properties.
The default delimiter (two line breaks) matches a blank line. As a special case, it also matches a blank line with DOS line ending (line break, carriage return, line break). This works for vCard 3.0 and iCalendar 2.0, which never contain blank lines.
When exporting, the default delimiter will always insert two line breaks regardless whether the items contain DOS line ends. As a special case, the initial newline of a delimiter is skipped if the item already ends in a newline.
A pseudo-random device ID is generated automatically. Therefore setting the deviceId sync property is only necessary when manually recreating a configuration or when a more descriptive name is desired.
The available templates for different known SyncML servers are listed when using a single question mark instead of template name. When using the ?<device> format, a fuzzy search for a template that might be suitable for talking to such a device is done. The matching works best when using <device> = <Manufacturer> <Model>. If you don't know the manufacturer, you can just keep it as empty. The output in this mode gives the template name followed by a short description and a rating how well the template matches the device (100% is best).
This section lists predefined properties. Backends can add their own properties at runtime if none of the predefined properties are suitable for a certain setting. Those additional properties are not listed here. Use --sync/datastore-property ? to get an up-to-date list.
The predefined properties may also be interpreted slightly differently by each backend and sync protocol. Sometimes this is documented in the comment for each property, sometimes in the documentation of the backend or sync protocol.
Properties are listed together with all recognized aliases (in those cases where a property was renamed at some point), its default value, sharing state (unshared/shared/global). Some properties must be defined, which is marked with the word required.
HTTP(S) SyncML servers:
http://example.com/sync
OBEX over Bluetooth uses the MAC address, with the channel chosen automatically:
obex-bt://00:0A:94:03:F3:7E
If the automatism fails, the channel can also be specified:
obex-bt://00:0A:94:03:F3:7E+16
For peers contacting us via Bluetooth, the MAC address is used to identify it before the sync starts. Multiple urls can be specified in one syncURL property:
obex-bt://00:0A:94:03:F3:7E obex-bt://00:01:02:03:04:05
In the future this might be used to contact the peer via one of several transports; right now, only the first one is tried.
plain text : password = <insert your password here> ask : password = - env variable: password = ${<name of environment variable>}
0 - suppress all notifications 1 - show only errors 2 - show information about changes and errors (in practice currently the same as level 3) 3 - show all notifications, including starting a sync
Before reducing this interval, consider that it will increase resource consumption on the local and remote side. Some SyncML server operators only allow a certain number of sessions per day. The value 0 has the effect of only running automatic synchronization when changes are detected (not implemented yet, therefore it basically disables automatic synchronization).
This prevents running a sync when network connectivity is unreliable or was recently established for some other purpose. It is also a heuristic that attempts to predict how long connectivity be available in the future, because it should better be available long enough to complete the synchronization.
This setting is only for debugging purpose and only has an effect during the initial sync of a client. Later it remembers the method that was supported by the server and uses that. When acting as server, clients contacting us can use both basic and md5 authentication.
When acting as server, this setting controls how long a client is allowed to not send a message before the synchronization is aborted.
Servers cannot resend messages, so this setting has no effect in that case.
The WebDAV backend also resends messages after a temporary network error. It uses exponential backoff to determine when the server is available again. This setting is divided by 24 to obtain the initial delay (default: 2m => 5s), which is then doubled for each retry.
On a server, this option controls what kind of Server Alerted Notification is sent to the client to start a synchronization. By default, first the format from 1.2 is tried, then in case of failure, the older one from 1.1. 1.2/1.1 can be set explicitly, which disables the automatism.
Instead or in adddition to the version, several keywords can be set in this property (separated by spaces or commas):
Setting these flags should only be necessary as workaround for broken peers.
If this property is empty and the peer synchronizes with this configuration chosen by some other means, then its ID is recorded here automatically and later used to verify that the configuration is not accidentally used by a different peer.
SSL support when acting as HTTP server is implemented by the HTTP server frontend, not with these properties.
If unset, the default is to pick one automatically if support for any kind of password storage was enabled and use the config files otherwise. When choosing automatically, GNOME keyring is tried first because distinguishing between KDE and GNOME sessions automatically is tricky.
Note that using this option applies to all passwords in a configuration and that the --keyring command line option is merely an alias for setting the global property, so setting a single password as follows sets both keyring and proxyPasswords, and also moves the other passwords into the keyring, even if they were not stored there already:
When passwords were stored in a safe storage, their value is set to a single hyphen ("-") in the configuration. This means that when running a synchronization without using the storage, the password has to be entered interactively. The --print-config output always shows "-" instead of retrieving the password from the keyring.
refresh/one-way-from-server/client are also supported. Their use is discouraged because the direction of the data transfer depends on the role of the local side (can be server or client), which is not always obvious.
When accepting a sync session in a SyncML server (HTTP server), only datastores with sync != disabled are made available to the client, which chooses the final sync mode based on its own configuration. When accepting a sync session in a SyncML client (local sync with the server contacting SyncEvolution on a device), the sync mode specified in the client is typically overriden by the server.
A special 'virtual' backend combines several other datastores and presents them as one set of items to the peer. For example, Nokia phones typically exchange tasks and events as part of one set of calendar items.
Right now such a virtual backend is limited to combining one calendar datastore with events and one task datastore. They have to be specified in the database property, typically like this: calendar,todo
Different datastores combined in one virtual datastore must have a common format. As with other backends, the preferred format can be influenced via the 'syncFormat' attribute.
Here's the full list of potentially supported backends, valid 'backend' values for each of them, and possible formats. Note that SyncEvolution installations usually support only a subset of the backends; that's why e.g. "addressbook" is unambiguous although there are multiple address book backends.
Errors while starting to sync and parsing and/or storing items on either client or server can be caused by a mismatch between the sync format and uri at the peer.
Most backends have a default database, like for example the system address book. Not setting this property selects that default database.
If the backend is a virtual data datastore, this field must contain comma seperated list of sub datasources actually used to store data. If your sub datastore has a comma in name, you must prevent taht comma from being mistaken as the separator by preceding it with a backslash, like this: database=Source1PartA\,PartB,Source2\\Backslash
To get a full list of available databases, run syncevolution --print-databases. The name is printed in front of the colon, followed by an identifier in brackets. Usually the name is unique and can be used to reference the data datastore. The default data datastore is marked with <default> at the end of the line, if there is a default.
Warning: setting database user/password in cases where it is not needed, as for example with local Evolution calendars and addressbooks, can cause the Evolution backend to hang.
List the known configuration templates:
syncevolution --template ?
Create a new configuration, using the existing Memotoo template:
syncevolution --configure \
username=123456 \
"password=!@#ABcd1234" \
memotoo
Note that putting passwords into the command line, even for short-lived processes as the one above, is a security risk in shared environments, because the password is visible to everyone on the machine. To avoid this, remove the password from the command above, then add the password to the right config.ini file with a text editor. This command shows the directory containing the file:
syncevolution --print-configs
Review configuration:
syncevolution --print-config memotoo
Synchronize all datastores:
syncevolution memotoo
Deactivate all datastores:
syncevolution --configure \
sync=none \
memotoo
Activate address book synchronization again, using the --sync shortcut:
syncevolution --configure \
--sync two-way \
memotoo addressbook
Change the password for a configuration:
syncevolution --configure \
password=foo \
memotoo
Set up another configuration for under a different account, using the same default databases as above:
syncevolution --configure \
username=joe \
password=foo \
--template memotoo \
memotoo_joe
Set up another configuration using the same account, but different local databases (can be used to simulate synchronizing between two clients, see Exchanging Data:
syncevolution --configure \
username=123456 \
password=!@#ABcd1234" \
sync=none \
memotoo@other syncevolution --configure \
database=<name of other address book> \
@other addressbook syncevolution --configure \
sync=two-way \
memotoo@other addressbook syncevolution memotoo syncevolution memotoo@other
Migrate a configuration from the <= 0.7 format to the current one and/or updates the configuration so that it looks like configurations created anew with the current syncevolution:
syncevolution --migrate memotoo
In the simple examples above, SyncEvolution exchanges data with servers via the SyncML protocol. Starting with release 1.2, SyncEvolution also supports other protocols like CalDAV and CardDAV.
These protocols are implemented in backends which behave like local datastores. SyncEvolution then synchronizes data between a pair of backends. Because the entire sync logic (matching of items, merging) is done locally by SyncEvolution, this mode of operation is called local sync.
Some examples of things that can be done with local sync:
Because local sync involves two sides, two sync configurations are needed. One is called the target config. Traditionally, this really was a configuration called target-config, for example target-config@google. Using this particular name is no longer required.
The target config can hold properties which apply to all datastores inside its context, like user name, password and URL for the server (more on that below) and sync settings (like logging and data backups). Once configured, the target config can be used to list/import/export/update items via the SyncEvolution command line. It cannot be used for synchronization because it does not defined what the items are supposed to be synchronized with.
For synchronization, a second originating config is needed. This config has the same role as the traditional SyncML sync configs and is typically defined in the same implicit @default context as those configs. All configs in that context use the same local data, thus turning that local data into the hub through with data flows to all peers that the host is configured to sync with.
A sync config becomes an originating config in a local sync by setting the syncURL to the special URL local://[<target config name>][@<some context name>]. This selects the target config to sync with. If the target config name is left out, the actual string target-config is used as name. The context can be omitted if the target config name is unique. Originating and target config can be in the same context. Care must be taken to not use a datastore more than once in a local sync.
In addition, peerIsClient=1 must be set in the originating config, because SyncEvolution only supports running the SyncML client on the target side. It makes sense to use the local databases on originating side, because that side requires more frequent access to the data.
The originating config defines the database pairs, either implicitly (by using the same datastore names on both sides, which is possible when different contexts are used) or explicitly (via the uri properties set for the datastores on the originating side). The originating config also defines the sync mode for each pair. uri and sync values on the target side are ignored and do not have to be specified.
As a special case, datastores used in combination with the target config may access the credentials and syncURL stored there as fallback when nothing was specified for the datastores directly. This makes sense for the WebDAV and ActiveSync backends where the credentials are typically the same and (depending on the web server) the same start URL can be used to find calendar and contact databases.
If this feature is not used, the syncURL could be left empty because local sync itself does not use it. However, the command line expects it to be set to none explicitly to detect typos.
This section explains how to use local syncing for CalDAV and CardDAV. Both protocols are based on WebDAV and are provided by the same backend. They share username/password/syncURL properties defined in their target config.
The credentials must be provided if the server is password protected. The syncURL is optional if the username is an email address and the server supports auto-discovery of its CalDAV and/or CardDAV services (using DNS SRV entries, .well-known URIs, properties of the current principal, ...).
Alternatively, credentials can also be set in the databaseUser and databasePassword properties of the datastore. The downside is that these values have to be set for each datastore and cannot be shared. The advantage is that, in combination with setting database, such datastores can be used as part of a normal SyncML server or client sync config. SyncEvolution then reads and writes data directly from the server and exchanges it via SyncML with the peer that is defined in the sync config.
The database property of each datastore can be set to the URL of a specific collection (= database in WebDAV terminology). If not set, then the WebDAV backend first locates the server based on username or syncURL and then scans it for the default event resp. contact collection. This is done once in the initial synchronization. At the end of a successful synchroniation, the automatic choice is made permanent by setting the database property.
To scan for collections, use:
syncevolution --print-databases \
backend=<caldav or carddav> \
username=<email address or user name> \
"password=!@#ABcd1234" \
syncURL=<base URL of server, if server auto-discovery is not supported>
Configuration templates for Google Calendar/Contacts, Yahoo Calendar and a generic CalDAV/CardDAV server are included in SyncEvolution. The Yahoo template also contains an entry for contact synchronization, but using it is not recommended due to known server-side issues.
The following commands set up synchronization with a generic WebDAV server that supports CalDAV, CardDAV and scanning starting at the root of the server.
# configure target config syncevolution --configure \
--template webdav \
syncURL=http://example.com \
username=123456 \
"password=!@#ABcd1234" \
target-config@webdav # configure sync config syncevolution --configure \
--template SyncEvolution_Client \
syncURL=local://@webdav \
username= \
password= \
webdav \
calendar addressbook # initial slow sync syncevolution --sync slow webdav # incremental sync syncevolution webdav
Here are some alternative ways of configuring the target config:
# A) Server supports DNS auto-discovery via domain name in the username. syncevolution --configure \
--template webdav \
username=123456@example.com \
"password=!@#ABcd1234" \
target-config@webdav # B) Explicitly specify collections (from server documentation or --print-databases). # The 'calendar' and 'addressbook' names are the ones expected by the sync config # above, additional datastores can also be configured and/or the names can be changed. syncevolution --configure \
username=123456 \
"password=!@#ABcd1234" \
--template none \
syncURL=http://example.com \
addressbook/backend=carddav \
addressbook/database=http://example.com/addressbooks/123456/ \
calendar/backend=caldav \
calendar/database=http://example.com/calendar/123456/ \
target-config@webdav \
calendar addressbook
When creating these target configs, the command line tool tries to verify that the datastores really work and (in the case of --template webdav) will enable only datastores which really work. This involves contacting the WebDAV server.
Finally, here is how the @webdav context needs to be configured so that SyncML clients or servers can be added to it:
# configure datastores syncevolution --configure \
databaseUser=123456 \
"databasePassword=!@#ABcd1234" \
addressbook/backend=carddav \
addressbook/database=http://example.com/addressbooks/123456/ \
calendar/backend=caldav \
calendar/database=http://example.com/calendar/123456/ \
@webdav \
calendar addressbook # configure one peer (Memotoo in this example): syncevolution --configure \
username=654321 \
password=^749@2524 \
memotoo@webdav # sync syncevolution --sync slow memotoo@webdav
For Google there is no common start URL for CalDAV and CardDAV, therefore the "Google" template lists all that may be relevant and the setup is very similar to the generic webdav case, except that the syncURL does not have to be specified:
# configure target config syncevolution --configure \
--template google \
username=john.doe@gmail.com \
"password=!@#ABcd1234" \
target-config@google # configure sync config syncevolution --configure \
--template SyncEvolution_Client \
syncURL=local://@google \
username= \
password= \
google \
calendar addressbook # initial slow sync syncevolution --sync slow google # incremental sync syncevolution google
If your Google account is configured to use two-factor login, then you need to create an application specific password for SyncEvolution. See https://support.google.com/mail/answer/1173270
Google already announced that they will turn off support for logging into their CalDAV/CardDAV services with plain username/password credentials. SyncEvolution supports the new login method, OAuth, but it depends on additional components to implement OAuth: GNOME Online Accounts, Ubuntu Online Accounts, or gSSO.
Support for GNOME Online Accounts (GOA) is compiled into syncevolution.org binaries and therefore documented here. For instructions regarding binaries shipped by distributions please consult the documentation provided by the distribution or search the web.
For Google Calendar, GOA >= 3.8 is required. For Google Contacts, GOA 3.8 may work if it was patched by the distribution (as done in Debian Jessie), otherwise a version >= 3.10 is required.
Use the GNOME Control Center to create an account for Google. It is not necessary to enable any of the data categories. That would turn on access in other GNOME apps (for example, Evolution), whereas SyncEvolution's use of the account is configured separately via the SyncEvolution command line.
When configuring SyncEvolution for Google, follow the instructions above with username=goa:<Google email address> and empty password. If the email address does not uniquely identify the GOA account, the SyncEvolution command line will provide a list of accounts to choose from.
SyncEvolution transmits address book entries as vCard 2.1 or 3.0 depending on the sync format chosen in the configuration. Evolution uses 3.0 internally, so SyncEvolution converts between the two formats as needed. Calendar items and tasks can be sent and received in iCalendar 2.0 as well as vCalendar 1.0, but vCalendar 1.0 should be avoided if possible because it cannot represent all data that Evolution stores.
NOTE:
How the server stores the items depends on its implementation and configuration. To check which data is preserved, one can use this procedure (described for contacts, but works the same way for calendars and tasks):
Now one can either compare the address books in Evolution or do that automatically, described here for contacts:
Normalizing is necessary because the order of cards and their properties as well as other minor formatting aspects may be different. The output comes from a side-by-side comparison, but is augmented by the script so that the context of each change is always the complete item that was modified. Lines or items following a ">" on the right side were added, those on the left side followed by a "<" were removed, and those with a "|" between text on the left and right side were modified.
The automatic unit testing (see HACKING) contains a testItems test which verifies the copying of special entries using the same method.
Modifying one of the address books or even both at the same time and then synchronizing back and forth can be used to verify that SyncEvolution works as expected. If you do not trust SyncEvolution or the server, then it is prudent to run these checks with a copy of the original address book. Make a backup of the .evolution/addressbook directory.
SyncML clients and servers consider each entry in a database as one item. Items can be added, removed or updated. This is the item change information that client and server exchange during a normal, incremental synchronization.
If an item is saved, removed locally, and reimported, then this is usually reported to a peer as "one item removed, one added" because the information available to SyncEvolution is not sufficient to determine that this is in fact the same item. One exception are iCalendar 2.0 items with their globally unique ID: the modification above will be reported to the server as "one item updated".
That is better, but still not quite correct because the content of the item has not changed, only the meta information about it which is used to detect changes. This cannot be avoided without creating additional overhead for normal synchronizations.
SyncEvolution reports item changes (the number of added, removed and updated items) as well as data changes. These data changes are calculated by comparing database dumps using the synccompare tool. Because this data comparison ignores information about which data belongs to which item, it is able to detect that re-adding an item that was removed earlier does not change the data, in contrast to the item changes. On the other hand, removing one item and adding a different one may look like updating just one item.
To support recovery from a synchronization which damaged the local data or modified it in an unexpected way, SyncEvolution can create the following files during a synchronization:
If the sync configuration property logdir is set, then a new directory will be created for each synchronization in that directory, using the format <peer>-<yyyy>-<mm>-<dd>-<hh>-<mm>[-<seq>] with the various fields filled in with the time when the synchronization started. The sequence suffix will only be used when necessary to make the name unique. By default, SyncEvolution will never delete any data in that log directory unless explicitly asked to keep only a limited number of previous log directories.
This is done by setting the maxlogdirs limit to something different than the empty string and 0. If a limit is set, then SyncEvolution will only keep that many log directories and start removing the "less interesting" ones when it reaches the limit. Less interesting are those where no data changed and no error occurred.
To avoid writing any additional log file or database dumps during a synchronization, the logdir can be set to none. To reduce the verbosity of the log, set loglevel. If not set or 0, then the verbosity is set to 3 = DEBUG when writing to a log file and 2 = INFO when writing to the console directly. To debug issues involving data conversion, level 4 also dumps the content of items into the log.
The following environment variables control where SyncEvolution finds files and other aspects of its operations.
Note that in addition to this directory, SyncEvolution also always searches for configuration files inside $HOME/.config/syncevolution-xml. Files with the same relative path and name as in /usr/share/syncevolution/xml override those files, others extend the final configuration.
See known issues and the support web page for more information.
http://syncevolution.org
2022-09-06 | 2.0.0 |