1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<meta name="author" content="Dominik Reichl" />
<meta name="DC.title" content="Synchronization - KeePass" />
<meta name="DC.creator" content="Dominik Reichl" />
<meta name="DC.type" content="Text" />
<meta name="DC.format" content="text/html" />
<meta name="DC.language" content="en" />
<meta name="DC.rights" content="Copyright (C) 2003-2019 Dominik Reichl" />
<meta name="robots" content="index, follow" />
<meta name="flattr:id" content="42rykv" />
<title>Synchronization - KeePass</title>
<base target="_self" />
<link rel="stylesheet" type="text/css" href="../../default.css" />
</head>
<body>
<table class="sectionsummary"><tr><td width="68">
<img src="../images/b64x64_dataexchange.png" width="64" height="64"
class="singleimg" align="left" alt="Synchronization" />
</td><td valign="middle"><h1>Synchronization</h1><br />
Merge changes made in multiple copies of a database.
</td></tr></table>
<ul>
<li><a href="#intro">Introduction and Requirements</a></li>
<li><a href="#invoke">Invoking a Synchronization</a></li>
<li><a href="#tech">Technical Details</a></li>
<li><a href="#adv">Advanced Synchronization Schemes</a></li>
</ul>
<br />
<a name="intro"></a>
<h2 class="sectiontitle">
<img src="../images/b16x16_help.png" class="singleimg" alt="Help" /> Introduction
and Requirements</h2>
<p>KeePass 2.x features a powerful, built-in synchronization mechanism.
Changes made in multiple copies of a database file can be merged safely.</p>
<p>After synchronizing two files A and B, both A and B are up-to-date
(i.e. KeePass saves the merged data to both locations when performing
a synchronization).</p>
<p><b>Requirements.</b></p>
<ul>
<li>If the files to be synchronized are accessible via a protocol that
KeePass supports by default (e.g. files on a local hard disk or a network
share, FTP, HTTP/WebDAV, ..., see the page
<a href="ioconnect.html">Loading/Saving From/To URL</a> for details),
then no plugins/extensions are required.</li>
<li>If one of the files to be synchronized should be accessed via
SCP, SFTP or FTPS, you need the
<a href="https://keepass.info/plugins.html#ioprotocolext"
target="_blank">IOProtocolExt</a>
plugin, which adds support for these protocols to KeePass.</li>
<li>If one of the files to be synchronized is stored in an online
storage (like e.g. Amazon's S3, DigitalBucket, ...), you need
an online storage provider
<a href="https://keepass.info/plugins.html" target="_blank">plugin</a>
(e.g.
<a href="https://keepass.info/plugins.html#keeanywhere"
target="_blank">KeeAnywhere</a>,
<a href="https://keepass.info/plugins.html#keecloud"
target="_blank">KeeCloud</a> or
<a href="https://keepass.info/plugins.html#keepasssync"
target="_blank">KeePassSync</a>).
Note that you do <i>not</i> need a plugin
in the other cases above (files on a local hard disk or network share,
FTP, HTTP/WebDAV, SCP, SFTP, FTPS, ...).</li>
</ul>
<br />
<a name="invoke"></a>
<h2 class="sectiontitle">
<img src="../images/b16x16_dataexchange.png" class="singleimg" alt="Synchronization" /> Invoking
a Synchronization</h2>
<p>There are multiple ways how a synchronization can be invoked:</p>
<ul>
<li><b>Manually.</b>
A synchronization can be started manually by navigating to
<i>'File'</i> → <i>'Synchronize'</i> and clicking <i>'Synchronize with File'</i>
or <i>'Synchronize with URL'</i> (depending on whether the file to be synchronized
with is stored on a local drive / network share or on a server accessible via an URL).
If you've previously opened or synchronized with the target file, you can
also simply point on <i>'Recent Files'</i> (in the <i>'Synchronize'</i> menu)
and select the file.
Manual synchronization is only possible when the currently opened database
is a local file
(files on a network share are here considered to be local files);
when you've opened a file from a server using an URL,
the <i>'Synchronize'</i> menu is disabled.</li>
<li><b>Command 'Save'.</b>
When invoking the 'Save' command, KeePass checks whether the file on disk/server
has been modified while you were editing it. If it has been modified,
KeePass prompts whether you want to overwrite or synchronize with the file.
Note this applies only to the 'Save' command, not the 'Save As' command.
See the page
<a href="../base/multiuser.html">Multi-User</a> for details
(section 'KeePass 2.x: Synchronize or Overwrite').</li>
<li><b>Triggers.</b>
In more complex situations you can use the synchronization trigger action.
See the page
<a href="triggers.html">Triggers</a> for details.</li>
<li><b>Scripting.</b>
In order to perform a synchronization without opening KeePass,
the synchronization command of KPScript can be used. See the KPScript
help page
<a href="../v2_dev/scr_sc_index.html">Single Command Operations</a>
for details.</li>
</ul>
<br />
<a name="tech"></a>
<h2 class="sectiontitle">
<img src="../images/b16x16_dataexchange.png" class="singleimg" alt="Synchronization" /> Technical
Details</h2>
<p>The synchronization algorithm is rather complex and it would take
many pages to describe in detail how it's working.
Developers interested in this can have a look into the KeePass source code.
Here are the most important properties of the synchronization algorithm:</p>
<ul>
<li>In order to decide which copy of an object is the latest one,
KeePass mainly uses the last modification time of the object
(which KeePass updates automatically each time the object is changed).</li>
<li>The synchronization is performed on entry level. This e.g. means that
a combination of user name / password is always consistent
(synchronization on field level will not be implemented, because
combinations could become inconsistent with this).</li>
<li>In case of parallel updates and collisions, KeePass tries to store
all information in an appropriate place. For example, when you have an
entry E in a database A, make a copy B of A, change E in B, change E in A,
and synchronize A and B, then E in A is treated as current and the changes
made to E in B are stored as a history version of E (see tab 'History' in
the entry dialog), i.e. the changes made in B aren't lost.</li>
</ul>
<br />
<a name="adv"></a>
<h2 class="sectiontitle">
<img src="../images/b16x16_dataexchange.png" class="singleimg" alt="Synchronization" /> Advanced
Synchronization Schemes</h2>
<ul>
<li><a href="https://keepass.info/help/kb/trigger_examples.html#dbsync"
target="_blank">Local↔Master Synchronization</a><br />
A synchronization scheme that prevents data loss when database files are
overwritten by other applications (e.g. cloud storage service software),
using a trigger.</li>
<li><a href="https://sourceforge.net/p/keepass/discussion/329220/thread/be5d5787/"
target="_blank">Hybrid Master⇌Scratch↔Working Synchronization</a><br />
A synchronization scheme that keeps a smaller database consisting of subset
of entries synchronized with a larger database.</li>
</ul>
</body></html>
|