# Syncing your &handheld; with a PC

This chapter describes the synchronization process that &kpilot; uses, focusing on the &kpilot; daemon functionality. You may sync your &handheld; using the internal viewers and / or conduits, depending on your personal preferences. Conduits allow external applications to interface with the data on your &handheld;.

It is a good idea to make a backup of your &handheld; regularly. Other than making backups, it should rarely be necessary to do anything other than drop your &handheld; on the cradle and press the &HotSync; button. The &kpilot; daemon icon in the system tray will flash indicating that a sync is under way.

KPilot Daemon Pop-Up Menu KPilot daemon pop-up menu

KPilot daemon pop-up menu

To which type of sync &kpilot; will perform next, you can use the main application File menu, or right click the &kpilot; daemon icon located in the system tray, and select one of the menu items under the Next Sync sub menu.

If you hover over the &kpilot; daemon icon, a tooltip will appear showing you what the type of sync &kpilot; will perform next.

In short, the sync types are:

- HotSync: this option offers a nice balance between speed and data safety.

- FastSync: only sync those databases that have conduits.

- FullSync: the safest option, but takes the longest time to complete.

- Backup: copy all the data from the &handheld; to the PC.

- Restore: copy the data from a previous backup from the PC to the &handheld;, erasing the data previously held there.

  Use the restore functionality with care, as you can lose all the new data entered on the &handheld; since the last backup.

Alternatively, you can change the default syncing behavior of &kpilot; by choosing the most suitable option in the HotSync configure dialog.

To configure the conduits or the sync process, you do not need to open the main &kpilot; application, as the Configure KPilot... menu item is available on the &kpilot; daemon pop-up menu as well.

## Backing up your &handheld; data

On every backup, &kpilot; stores a copy of all your &handheld; data under the `$KDEHOME/share/apps/kpilot/DBBackup/User Name/` folder, allowing you to restore that copy later, if needed. The `$KDEHOME` environment variable (typically `/home/Login Name/.kde/`) points to the folder that contains your configuration and data for the &kde; applications.

It is a good idea to backup your data often. To perform a backup, you can click the Next Sync Backup on the &kpilot; daemon icon pop-up menu or the File Backup menu item on the main &kpilot; application menu in order to make the next sync a backup. Then, just press the &HotSync; button.

## Restoring Your &handheld; Data

The restore operation consist of transferring all the data previously saved on the PC to the &handheld;, effectively erasing all the new data held by the device by returning it to a previous state.

Use the restore functionality with care, as you can lose all the new data entered on the &handheld; since the last backup.

The data saved on the last backup is located on the `$KDEHOME/share/apps/kpilot/DBBackup/User Name/` folder. The `$KDEHOME` environment variable (typically `/home/Login Name/.kde/`) points to the folder that contains your configuration and data for the &kde; applications.

The most common use for the restore functionality is to recover from a hardware or software failure on the device. The restore function can only be accessed from the main &kpilot; application, and not from the &kpilot; daemon, as restoring the data is not a common operation. In order to restore the data at the next sync, click the File Restore menu item, then press the &HotSync; button.

## Selecting the Synchronization Type

There are three ways to sync your &handheld;, HotSync, FastSync or FullSync.

When you press the &HotSync; button on your &handheld;, &kpilot;'s will run the default sync operation (usually a HotSync). You can select the default sync operation in the HotSync configure dialog. Alternatively, you can click one of the sync options on the main &kpilot; application File menu or on the &kpilot; daemon pop-up Next Sync submenu.

Using the HotSync configure dialog is the only way to change the default sync operation. The main &kpilot; application File menu items or the &kpilot; daemon pop-up Next Sync submenu items change only the type of sync that will be performed next.

KPilot Daemon Pop-Up Menu KPilot daemon pop-up menu

KPilot daemon pop-up menu

- HotSync: run all selected conduits, sync the databases with a modified flag set, updating the modified records only. Performs a fast backup, backing up only the databases that were modified. This option offers a nice balance between speed and data safety. File menu and on the daemon pop-up menu Next Sync submenu.

- FastSync: Only sync those databases that have conduits, and perform no backup of the data on the &PalmPilot;, reducing greatly the time required for the sync operation. This also means that if something goes wrong with your &PalmPilot;, you may not be able to recover the databases. This is a classic trade-off between speed and safety. Available on the main application File menu and on the daemon pop-up menu Next Sync submenu. This operation only makes sense if you do not use &kpilot; built-in database viewer applications, but uses &kpilot; to sync your &handheld; data with external applications, using conduits.

- FullSync: run all selected conduits, and sync all databases, reading all records, and performing a full backup. It is the safest option, but takes the longest time to complete, as it will merge all the records from the &handheld; and your desktop. It is the &kpilot; equivalent of the Palm SlowSync.

  Available on the main application File menu only.

## Syncing your &handheld; Data Using Conduits

Conduits are programs that interface your &handheld; data with PC applications or sync your &handheld; data with files that can be used by PC applications.

Conduits can be set up by selecting Settings Configure KPilot... , or using the daemon pop up menu and clicking the Configure KPilot... menu item.

KPilot Daemon Pop-Up Menu KPilot daemon pop-up menu

KPilot daemon pop-up menu

The Conduits tree in the configuration dialog collects all the installed conduits available. The conduits can be enabled and disabled by clicking on the check box to the left of the conduit's name. Conduits can have an extensive configuration of their own, and may be supplied by third parties. Most of the conduits require some initial configuration, so it is strongly recommended to check the section detailing the default conduits configuration before using them.

The default conduits are the following:

KNotes / Memos

- Synchronizes the Memo Pad application with &knotes;.

  The conduit only synchronizes the Memo Pad data if &knotes; is running. If you want to enable this functionality, please remember to start &knotes; first, or check if it is already running (tip: look for the &knotes; icon in the system tray).

Time Synchronization

- Sets the &handheld;'s time to that of the desktop machine. Useful for keeping the clock of the &handheld; accurate.

Calendar (KOrganizer)

- Synchronizes the Datebook application with &korganizer; or with a iCalendar file of your choice.

Palm DOC

- Automatically converts, installs and sync text files in the &PalmPilot; DOC format, so you can read the text files with most DOC-capable applications on the &handheld;. There are many free or open source Palm DOC readers, and some Palm DOC editors for your handheld.

  Any plain text file can be easily converted. For instance, you can download and convert the public domain books provided by the Gutenberg Project and read them in your &handheld;.

Addressbook

- Synchronizes the Address application with &kaddressbook; or with a vCard file of your choice.

System Information

- Writes information about your &handheld;, (such as OS version, RAM available, and the list of databases) to a file. Useful mostly for debugging purposes.

ToDo's (KOrganizer)

- Synchronizes the Todo list application with &korganizer; or with a iCalendar file of your choice.

MAL (AvantGo) Conduit

- Synchronizes your &handheld; with the &AvantGo; server. The &AvantGo; server offers general content (news, guides, stock quotes, &etc;) in a format that is suitable for reading in a &handheld;. To use this conduit, you need to register, subscribe the channels you select and install the &AvantGo; software on your &handheld;.

Mail

- Sends mail written on the &handheld; through &kmail;. There is no provision for receiving mail, however.

Perl

Python

NULL

- These conduits are intended as a programming demonstration, and serve no practical purpose during a &HotSync;. They are not normally listed, but you may see them on some systems.

The Conduit Setup Dialog The Conduit Setup Dialog

The Conduit Setup Dialog

## Resolving Conflicts

Data records can be changed both on the &handheld; and on the PC. If one record has incompatible changes in both the &handheld; and the PC, (such as changing a phone number in different ways on both sides), the conflicting change needs to be resolved so that both the &handheld; and the PC are in sync again.

A pop-up dialog may appear, asking you how to resolve the conflict, or you may have a general rule to automatically handle these conflicts (depending on your conflict resolution choice). Note that you can define different resolution choices for different conduits in the conduits configuration dialog.