69 </div> |
69 </div> |
70 <p>The file <code>$HOME/.dav/sync.xml</code> is used for configuring sync-directories.</p> |
70 <p>The file <code>$HOME/.dav/sync.xml</code> is used for configuring sync-directories.</p> |
71 <p>The <em>sync.xml</em> file is an XML file with <code><configuration></code> as root element. This element can only have <code><directory></code> elements as children.</p> |
71 <p>The <em>sync.xml</em> file is an XML file with <code><configuration></code> as root element. This element can only have <code><directory></code> elements as children.</p> |
72 <h2 id="directory">directory</h2> |
72 <h2 id="directory">directory</h2> |
73 <p>This element configures a sync-directory. A sync-directory must have a unique name, a (local) path, repository and a database.</p> |
73 <p>This element configures a sync-directory. A sync-directory must have a unique name, a (local) path, repository and a database.</p> |
74 <p>Required elements: <code><name></code>, <code><repository></code>, <code><path></code>, <code><database></code><br />Optional elements: <code><collection></code>, <code><trash></code>, <code><max-retry></code>, <code><backup-on-pull></code>, <code><lock-pull></code>, <code><lock-push></code>, <code><filter></code></p> |
74 <p>Required elements: <code><name></code>, <code><repository></code>, <code><path></code>, <code><database></code><br /> |
|
75 Optional elements: <code><collection></code>, <code><trash></code>, <code><max-retry></code>, <code><backup-on-pull></code>, <code><lock-pull></code>, <code><lock-push></code>, <code><filter></code></p> |
75 <h3 id="name">name</h3> |
76 <h3 id="name">name</h3> |
76 <p>Unique sync-directory identifer. This identifer is used in combination with all <em>dav-sync</em> commands.</p> |
77 <p>Unique sync-directory identifer. This identifer is used in combination with all <em>dav-sync</em> commands.</p> |
77 <p>Type: string<br />Example: <code><name>mysyncdir</name></code></p> |
78 <p>Type: string<br /> |
|
79 Example: <code><name>mysyncdir</name></code></p> |
78 <h3 id="repository">repository</h3> |
80 <h3 id="repository">repository</h3> |
79 <p>Name of the WebDAV-repository. A repository with the same name must be configured in [config.xml][1].</p> |
81 <p>Name of the WebDAV-repository. A repository with the same name must be configured in [config.xml][1].</p> |
80 <p>Type: string<br />Example: <code><name>myrepo</name></code></p> |
82 <p>Type: string<br /> |
|
83 Example: <code><name>myrepo</name></code></p> |
81 <h3 id="path">path</h3> |
84 <h3 id="path">path</h3> |
82 <p>The path of the local directory that should be synchronized. The path must be an absolute path or start with an environment variable. A path with an environment variable must start with an <code>$</code> followed by the variable name optionally followed by a path. For example:</p> |
85 <p>The path of the local directory that should be synchronized. The path must be an absolute path or start with an environment variable. A path with an environment variable must start with an <code>$</code> followed by the variable name optionally followed by a path. For example:</p> |
83 <pre><code>`<path>$HOME/Documents</path>`</code></pre> |
86 <pre><code>`<path>$HOME/Documents</path>`</code></pre> |
84 <p>The part between <code>$</code> and <code>/</code> is the environment variable name.</p> |
87 <p>The part between <code>$</code> and <code>/</code> is the environment variable name.</p> |
85 <p>Type: string<br />Example: <code><path>/absolute/path</path></code></p> |
88 <p>Type: string<br /> |
|
89 Example: <code><path>/absolute/path</path></code></p> |
86 <h3 id="database">database</h3> |
90 <h3 id="database">database</h3> |
87 <p>Path to the database file used for this sync-directory. The path must be relative to the <em>$HOME/.dav/</em> directory.</p> |
91 <p>Path to the database file used for this sync-directory. The path must be relative to the <em>$HOME/.dav/</em> directory.</p> |
88 <p>Type: string<br />Example: <code><database>myrepo-db.xml</database></code></p> |
92 <p>Type: string<br /> |
|
93 Example: <code><database>myrepo-db.xml</database></code></p> |
89 <h3 id="collection">collection</h3> |
94 <h3 id="collection">collection</h3> |
90 <p>Path of the collection relative to the repository root collection. For example if the repository url is <em>http://example.com/webdav/</em> and the collection value is <em>/myfiles/</em>, the directory is synchronized with <em>http://example.com/webdav/myfiles/</em></p> |
95 <p>Path of the collection relative to the repository root collection. For example if the repository url is <em>http://example.com/webdav/</em> and the collection value is <em>/myfiles/</em>, the directory is synchronized with <em>http://example.com/webdav/myfiles/</em></p> |
91 <p>Type: string<br />Default: /<br />Example: <code><collection>/myfiles</collection></code></p> |
96 <p>Type: string<br /> |
|
97 Default: /<br /> |
|
98 Example: <code><collection>/myfiles</collection></code></p> |
92 <h3 id="trash">trash</h3> |
99 <h3 id="trash">trash</h3> |
93 <p>Path to the trash directory for this sync-directory. Files that should be deleted will be moved to this directory. The value must be an absolute path or relative to the sync-directory path.</p> |
100 <p>Path to the trash directory for this sync-directory. Files that should be deleted will be moved to this directory. The value must be an absolute path or relative to the sync-directory path.</p> |
94 <p>Type: string<br />Example: <code><trash>.trash</trash></code></p> |
101 <p>Type: string<br /> |
|
102 Example: <code><trash>.trash</trash></code></p> |
95 <h3 id="max-retry">max-retry</h3> |
103 <h3 id="max-retry">max-retry</h3> |
96 <p>This integer value controls how many attempts of downloading/uploading a file in case of an error are made.</p> |
104 <p>This integer value controls how many attempts of downloading/uploading a file in case of an error are made.</p> |
97 <p>Type: integer<br />Default: 0<br />Example: <code><max-retry>3</max-retry></code></p> |
105 <p>Type: integer<br /> |
|
106 Default: 0<br /> |
|
107 Example: <code><max-retry>3</max-retry></code></p> |
98 <h3 id="backup-on-pull">backup-on-pull</h3> |
108 <h3 id="backup-on-pull">backup-on-pull</h3> |
99 <p>If this element has the value of true, the <em>pull</em> command will move old local files to the trash directory before downloading the new version from the server.</p> |
109 <p>If this element has the value of true, the <em>pull</em> command will move old local files to the trash directory before downloading the new version from the server.</p> |
100 <p>Type: boolean<br />Default: false<br />Example: <code><backup-on-pull>true</backup-on-pull></code></p> |
110 <p>Type: boolean<br /> |
|
111 Default: false<br /> |
|
112 Example: <code><backup-on-pull>true</backup-on-pull></code></p> |
101 <h3 id="lock-pull">lock-pull</h3> |
113 <h3 id="lock-pull">lock-pull</h3> |
102 <p>Enables locking for the <em>pull</em> command.</p> |
114 <p>Enables locking for the <em>pull</em> command.</p> |
103 <p>Type: boolean<br />Default: false<br />Example: <code><lock-pull>true</lock-pull></code></p> |
115 <p>Type: boolean<br /> |
|
116 Default: false<br /> |
|
117 Example: <code><lock-pull>true</lock-pull></code></p> |
104 <h3 id="lock-push">lock-push</h3> |
118 <h3 id="lock-push">lock-push</h3> |
105 <p>Enables locking for the <em>push</em> command.</p> |
119 <p>Enables locking for the <em>push</em> command.</p> |
106 <p>Type: boolean<br />Default: false<br />Example: <code><lock-push>true</lock-push></code></p> |
120 <p>Type: boolean<br /> |
|
121 Default: false<br /> |
|
122 Example: <code><lock-push>true</lock-push></code></p> |
107 <h3 id="filter">filter</h3> |
123 <h3 id="filter">filter</h3> |
108 <p>With the filter element, include and exclude filters can be specified, to control which files are synchronized. The <em>pull</em> and <em>push</em> command apply these filters to file paths. At first it is checked if a file is matching any include filter. If so only files matching not an exclude filter are further processed.</p> |
124 <p>With the filter element, include and exclude filters can be specified, to control which files are synchronized. The <em>pull</em> and <em>push</em> command apply these filters to file paths. At first it is checked if a file is matching any include filter. If so only files matching not an exclude filter are further processed.</p> |
109 <p>Note: The file path is relative to the directory path (and WebDAV collection) but always starts with an path separator.</p> |
125 <p>Note: The file path is relative to the directory path (and WebDAV collection) but always starts with an path separator.</p> |
110 <p>Optional elements: <code><include></code>, <code><exclude></code></p> |
126 <p>Optional elements: <code><include></code>, <code><exclude></code></p> |
111 <h3 id="include">include</h3> |
127 <h3 id="include">include</h3> |
112 <p>Controls which files will be included by <em>pull</em> and <em>push</em>. If an include filter is specified, only files matching this filter are included.</p> |
128 <p>Controls which files will be included by <em>pull</em> and <em>push</em>. If an include filter is specified, only files matching this filter are included.</p> |
113 <p>Type: regex string<br />Default: .*<br />Example:</p> |
129 <p>Type: regex string<br /> |
|
130 Default: .*<br /> |
|
131 Example:</p> |
114 <pre><code><filter> |
132 <pre><code><filter> |
115 <include>\.pdf$</include> |
133 <include>\.pdf$</include> |
116 </filter></code></pre> |
134 </filter></code></pre> |
117 <h3 id="exclude">exclude</h3> |
135 <h3 id="exclude">exclude</h3> |
118 <p>Controls which files will be excluded by <em>pull</em> and <em>push</em>.</p> |
136 <p>Controls which files will be excluded by <em>pull</em> and <em>push</em>.</p> |
119 <p>Type: regex string<br />Example:</p> |
137 <p>Type: regex string<br /> |
|
138 Example:</p> |
120 <pre><code><filter> |
139 <pre><code><filter> |
121 <exclude>^/secretdir</exclude> |
140 <exclude>^/secretdir</exclude> |
122 <exclude>\.DS_Store$</exclude> |
141 <exclude>\.DS_Store$</exclude> |
123 </filter></code></pre> |
142 </filter></code></pre> |
124 </div> |
143 </div> |