docs/html/introduction.html

Tue, 13 Jun 2023 21:58:29 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 13 Jun 2023 21:58:29 +0200
changeset 762
098b2e3ab240
parent 704
8b88efcbf56f
permissions
-rw-r--r--

fix iterator misuse in dav-sync delete-conflict

704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
1 <!DOCTYPE html>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
2 <html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 <head>
704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
4 <meta charset="utf-8" />
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5 <meta name="generator" content="pandoc" />
704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
283
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
7 <title>Introduction to dav-sync</title>
704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
8 <style type="text/css">
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
9 code{white-space: pre-wrap;}
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
10 span.smallcaps{font-variant: small-caps;}
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
11 span.underline{text-decoration: underline;}
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
12 div.column{display: inline-block; vertical-align: top; width: 50%;}
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
13 </style>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
14 <link rel="stylesheet" href="davdoc.css" />
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
15 <!--[if lt IE 9]>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
16 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
17 <![endif]-->
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
18 </head>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
19 <body>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
20 <div class="header">
285
02d3e4b1245f adds some small fixes for 1.0 release
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 283
diff changeset
21 <a href="./index.html"><span>DavUtils documentation</span></a>
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
22 </div>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
23 <div class="sidebar">
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
24 <div class="nav">
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
25 <h3>dav</h3>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
26 <ul>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
27 <li><a href="getting-started.html">Getting started</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
28 <li><a href="commands.html">Commands</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
29 <ul>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
30 <li><a href="list.html">list</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
31 <li><a href="get.html">get</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
32 <li><a href="put.html">put</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
33 <li><a href="mkdir.html">mkdir</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
34 <li><a href="remove.html">remove</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
35 <li><a href="copy.html">copy</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
36 <li><a href="move.html">move</a></li>
704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
37 <li><a href="rename.html">rename</a></li>
429
1607450065ba this could be the 1.2 release
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
38 <li><a href="export.html">export</a></li>
1607450065ba this could be the 1.2 release
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
39 <li><a href="import.html">import</a></li>
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
40 <li><a href="get-property.html">get-property</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
41 <li><a href="set-property.html">set-property</a></li>
320
12ed560c926c adds documentation for new features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 285
diff changeset
42 <li><a href="remove-property.html">remove-property</a></li>
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
43 <li><a href="lock.html">lock</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
44 <li><a href="unlock.html">unlock</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
45 <li><a href="info.html">info</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
46 <li><a href="date.html">date</a></li>
704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
47 <li><a href="versioncontrol.html">versioncontrol</a></li>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
48 <li><a href="list-versions.html">list-versions</a></li>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
49 <li><a href="checkout.html">checkout</a></li>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
50 <li><a href="checkin.html">checkin</a></li>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
51 <li><a href="uncheckout.html">uncheckout</a></li>
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
52 <li><a href="add-repository.html">add-repository</a></li>
429
1607450065ba this could be the 1.2 release
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
53 <li><a href="remove-repository.html">remove-repository</a></li>
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
54 <li><a href="list-repositories.html">list-repositories</a></li>
704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
55 <li><a href="repository-url.html">repository-url</a></li>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
56 <li><a href="add-user.html">add-user</a></li>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
57 <li><a href="remove-user.html">remove-user</a></li>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
58 <li><a href="edit-user.html">edit-user</a></li>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
59 <li><a href="list-users.html">list-users</a></li>
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
60 <li><a href="check-config.html">check-config</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
61 </ul>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
62 <li><a href="configuration.html">Configuration</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
63 <li><a href="encryption.html">Encryption</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
64 </ul>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
65 </div>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
66 <div class="nav">
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
67 <h3>dav-sync</h3>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
68 <ul>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
69 <li><a href="introduction.html">Introduction</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
70 <li><a href="sync-commands.html">Commands</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
71 <ul>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
72 <li><a href="pull.html">pull</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
73 <li><a href="push.html">push</a></li>
320
12ed560c926c adds documentation for new features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 285
diff changeset
74 <li><a href="archive.html">archive</a></li>
704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
75 <li><a href="restore.html">restore</a></li>
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
76 <li><a href="list-conflicts.html">list-conflicts</a></li>
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
77 <li><a href="resolve-conflicts.html">resolve-conflicts</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
78 <li><a href="delete-conflicts.html">delete-conflicts</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
79 <li><a href="trash-info.html">trash-info</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
80 <li><a href="empty-trash.html">empty-trash</a></li>
704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
81 <li><a href="list-versions.html">list-versions</a></li>
429
1607450065ba this could be the 1.2 release
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
82 <li><a href="add-tag.html">add-tag</a></li>
1607450065ba this could be the 1.2 release
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
83 <li><a href="remove-tag.html">remove-tag</a></li>
1607450065ba this could be the 1.2 release
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
84 <li><a href="set-tags.html">set-tags</a></li>
1607450065ba this could be the 1.2 release
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
85 <li><a href="list-tags.html">list-tags</a></li>
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
86 <li><a href="add-directory.html">add-directory</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
87 <li><a href="list-directories.html">list-directories</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
88 <li><a href="sync-check-config.html">check-config</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
89 <li><a href="check-repositories.html">check-repositories</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
90 </ul>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
91 <li><a href="sync-configuration.html">Configuration</a></li>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
92 </ul>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
93 </div>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
94 </div>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
95
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
96 <!-- begin content -->
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
97 <div class="content">
704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
98 <header>
283
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
99 <h1 class="title">Introduction to dav-sync</h1>
704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
100 </header>
283
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
101 <p>The dav-sync program can synchronize a local directory with a WebDAV collection.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
102 <h2 id="first-steps">First Steps</h2>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
103 <p>To use dav-sync it is required to configure a repository in <a href="./configuration.html">config.xml</a> and the directory in <a href="./sync-configuration.html">sync.xml</a>.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
104 <p>Create a repository with <a href="./add-repository.html">dav add-repository</a>. Unlike <em>dav</em>, <em>dav-sync</em> is not interactive and never shows an authentication prompt. Therefore the user and password <strong>must</strong> be specified if the server requires authentication.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
105 <pre><code>$ dav add-repository
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
106 Each repository must have an unique name.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
107 name: myfirstrepo
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
108
283
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
109 Specify the repository base url.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
110 url: http://example.com/webdav/
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
111
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
112 User for HTTP authentication.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
113 user (optional): myuser
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
114 password (optional): </code></pre>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
115 <p>After the repository is created, configure a sync-directory with <a href="./add-directory.html">dav-sync add-directory</a>.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
116 <pre><code>$ dav-sync add-directory
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
117 Each sync directory must have an unique name.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
118 name: mysyncdir
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
119 Enter local directory path.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
120 path: $HOME/important_files
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
121 Specify webdav repository.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
122 0) myfirstrepo
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
123 1) anotherrepo
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
124 repository: 0
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
125 Enter collection relative to the repository base url.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
126 collection (default: /): /important_files</code></pre>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
127 <p>The specified name is just an identifier and will be used with other dav-sync commands like <em>pull</em> and <em>push</em>.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
128 <p>After the configuration is created, you can synchronize your files. There are two commands for it: <em>pull</em> and <em>push</em>.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
129 <p>With <em>pull</em> you can apply all changes on the server to your local directory. The command scans the server and detects modified files and which files are deleted. All modified files will be downloadet and all deleted files will be locally removed (or moved to the trash directory). The first time you will run <em>pull</em> for a directory this will just download all files from the WebDAV collection.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
130 <p>You can run the <em>pull</em> command with:</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
131 <pre><code>dav-sync pull mysyncdir</code></pre>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
132 <p>The <em>push</em> command scans your local directory for changes, uploads all modified files and removes all locally deleted files from the server.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
133 <pre><code>dav-sync push mysyncdir</code></pre>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
134 <h2 id="database">Database</h2>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
135 <p>Every sync-directory has a database xml file that contains the etag and last modified date of each file. The etag is used to detect changes on the server and the last modified date is used to detect local changes. The database file is usually located in <em>$HOME/.dav/</em> and if you want to reset a sync-directory, you can delete the database. After that, <em>pull</em>/<em>push</em> (with disabled conflict detection) will download/upload all files.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
136 <h2 id="conflict-detection">Conflict detection</h2>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
137 <p>The <em>pull</em> and <em>push</em> commands detect if a file has changed remotely and locally. This is a conflict that must be resolved manually.</p>
704
8b88efcbf56f update html doc
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 563
diff changeset
138 <p>When <em>pull</em> detects a conflict it renames the local file to <em>orig-$number.$name</em> where <em>$number</em> is an integer, usually 0 if no other conflict file with the name exists and <em>$name</em> is the file’s name. After the file is renamed the new file from the server is downloadet. The user should merge the files manually then or just delete one or keep both. After that run <em>resolve-conflicts</em> to remove all conflict entries from the database otherwise <em>push</em> will ignore any file in a conflict state. There is also the <em>delete-conflicts</em> command that deletes all conflict files.</p>
283
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
139 <p>When <em>push</em> detects that a file is modified locally and on the server, it just skips this file. Run the <em>pull</em> command to get the new file from the server and resolve the conflict like described above.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
140 <h2 id="trash">Trash</h2>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
141 <p>For high data safety, a trash directory can be configured. If this is done, dav-sync will not delete files, but move them to the trash directory. Also the pull command can move files to the trash directory before overwriting them.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
142 <p>To enable the trash, add the <code>&lt;trash&gt;</code> element to the directory config. The trash path can be absolute or relative to the sync-directory path.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
143 <pre><code>&lt;directory&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
144 &lt;name&gt;mydir&lt;/name&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
145 &lt;path&gt;$HOME/myfiles&lt;/path&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
146 &lt;repository&gt;myrepo&lt;/repository&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
147 &lt;database&gt;mydir-db.xml&lt;/database&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
148
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
149 &lt;!-- enable trash dir --&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
150 &lt;trash&gt;.trash&lt;/trash&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
151 &lt;/directory&gt;</code></pre>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
152 <p>Files inside the trash directory will not be synchronized with the server.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
153 <p>Add the <code>&lt;backup-on-pull&gt;</code> element if you want to backup files to the trash directory before they are overwritten.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
154 <pre><code>&lt;directory&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
155 ...
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
156
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
157 &lt;backup-on-pull&gt;true&lt;/backup-on-pull&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
158 &lt;directory&gt;</code></pre>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
159 <h2 id="locking">Locking</h2>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
160 <p>It is highly recommended to lock the repository if it is expected that multiple users want to access and modify the repository simultaneously. Locking can be enabled with the <code>-l</code> option when using the <em>pull</em> or <em>push</em> command, or it can be permanently enabled in <em>sync.xml</em> for a directory with the <code>&lt;lock-pull&gt;</code> and <code>&lt;lock-push&gt;</code> elements.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
161 <pre><code>&lt;directory&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
162 ...
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
163 &lt;lock-pull&gt;true&lt;/lock-pull&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
164 &lt;lock-push&gt;true&lt;/lock-push&gt;
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
165 &lt;/directory&gt;</code></pre>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
166 <p>See <a href="./configuration.html">Configuration</a> for details.</p>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
167 <h2 id="encryption">Encryption</h2>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
168 <p>The <em>dav-sync</em> program uses the same repository settings as <em>dav</em>. If encryption is enabled for a repository, <em>dav-sync</em> stores files encrypted on the server. See <a href="./encryption.html">Encryption</a> for details.</p>
273
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
169 </div>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
170 <!-- end content -->
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
171 </body>
c743721d566f more documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
172 </html>

mercurial