docs/src/sync-configuration.md

Wed, 20 Nov 2019 08:44:26 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Wed, 20 Nov 2019 08:44:26 +0100
changeset 680
e66f2645be65
parent 428
b50ade8e7197
child 700
165811ea12ab
permissions
-rw-r--r--

ignore sigpipe in dav-sync

283
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
1 ---
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
2 title: 'Configuration'
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
3 ---
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
4
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
5 The file `$HOME/.dav/sync.xml` is used for configuring sync-directories.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
6
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
7 The *sync.xml* file is an XML file with `<configuration>` as root element. This element can only have `<directory>` elements as children.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
8
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
9 ## directory
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
10
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
11 This element configures a sync-directory. A sync-directory must have a unique name, a (local) path, repository and a database.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
12
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
13 Required elements: `<name>`, `<repository>`, `<path>`, `<database>` \
320
12ed560c926c adds documentation for new features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 283
diff changeset
14 Optional elements: `<collection>`, `<trash>`, `<max-retry>`, `<backup-on-pull>`, `<lock-pull>`, `<lock-push>`, `<lock-timeout>`, `<filter>`
283
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
15
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
16 ### name
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
17
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
18 Unique sync-directory identifer. This identifer is used in combination with all *dav-sync* commands.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
19
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
20 Type: string \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
21 Example: `<name>mysyncdir</name>`
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
22
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
23 ### repository
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
24
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
25 Name of the WebDAV-repository. A repository with the same name must be configured in [config.xml][1].
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
26
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
27 Type: string \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
28 Example: `<name>myrepo</name>`
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
29
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
30 ### path
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
31
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
32 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 `$` followed by the variable name optionally followed by a path. For example:
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
33
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
34 `<path>$HOME/Documents</path>`
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
35
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
36 The part between `$` and `/` is the environment variable name.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
37
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
38 Type: string \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
39 Example: `<path>/absolute/path</path>`
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
40
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
41 ### database
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
42
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
43 Path to the database file used for this sync-directory. The path must be relative to the *$HOME/.dav/* directory.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
44
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
45 Type: string \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
46 Example: `<database>myrepo-db.xml</database>`
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
47
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
48 ### collection
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
49
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
50 Path of the collection relative to the repository root collection. For example if the repository url is *http://example.com/webdav/* and the collection value is */myfiles/*, the directory is synchronized with *http://example.com/webdav/myfiles/*
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
51
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
52 Type: string \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
53 Default: / \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
54 Example: `<collection>/myfiles</collection>`
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
55
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
56 ### trash
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
57
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
58 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.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
59
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
60 Type: string \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
61 Example: `<trash>.trash</trash>`
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
62
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
63 ### max-retry
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
64
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
65 This integer value controls how many attempts of downloading/uploading a file in case of an error are made.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
66
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
67 Type: integer \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
68 Default: 0 \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
69 Example: `<max-retry>3</max-retry>`
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
70
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
71 ### backup-on-pull
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
72
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
73 If this element has the value of true, the *pull* command will move old local files to the trash directory before downloading the new version from the server.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
74
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
75 Type: boolean \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
76 Default: false \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
77 Example: `<backup-on-pull>true</backup-on-pull>`
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
78
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
79 ### lock-pull
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
80
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
81 Enables locking for the *pull* command.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
82
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
83 Type: boolean \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
84 Default: false \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
85 Example: `<lock-pull>true</lock-pull>`
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
86
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
87 ### lock-push
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
88
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
89 Enables locking for the *push* command.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
90
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
91 Type: boolean \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
92 Default: false \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
93 Example: `<lock-push>true</lock-push>`
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
94
320
12ed560c926c adds documentation for new features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 283
diff changeset
95 ### lock-timeout
12ed560c926c adds documentation for new features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 283
diff changeset
96
12ed560c926c adds documentation for new features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 283
diff changeset
97 Specifies the lock timeout in seconds. If the lock-timeout is 0, the client doesn't request a specific timeout and the server's default value is used. If the lock-timeout is -1, a infinite timeout is requested.
12ed560c926c adds documentation for new features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 283
diff changeset
98
12ed560c926c adds documentation for new features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 283
diff changeset
99 Type: integer \
12ed560c926c adds documentation for new features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 283
diff changeset
100 Default: 0 \
12ed560c926c adds documentation for new features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 283
diff changeset
101 Example: `<lock-timeout>50</lock-timeout>`
12ed560c926c adds documentation for new features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 283
diff changeset
102
428
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
103 ### tagconfig
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
104
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
105 Configures the local store for resource tags. If this element is specified, resource tags are stored locally.
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
106
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
107 Optional elements: local-store, detect-changes, xattr-name, on-conflict
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
108
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
109 ### local-store
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
110
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
111 Specifies the tag-store type. Currently the only available type is `xattr`.
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
112
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
113 The element can contain the attribute `format` with one of the following values: `text`, `csv`, `xml`, `macos`. The default value is `text`.
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
114
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
115 Type: tagstore type enum \
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
116 Default: xattr \
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
117 Example: `<local-store format="csv">xattr</local-store>`
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
118
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
119 ### xattr-name
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
120
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
121 Specifies the name of the extended attribute for storing tags. The default value is `tags`, unless you are using the `macos` format, where the default value is `com.apple.metadata:_kMDItemUserTags`.
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
122
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
123 Type: string \
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
124 Default: tags \
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
125 Example: `<xattr-name>file_tags</xattr-name>
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
126
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
127 ### detect-changes
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
128
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
129 Controls, if tag changes should be detected.
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
130
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
131 Type: boolean \
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
132 Default: false \
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
133 Example: `<detect-changes>true</detect-changes>`
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
134
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
135 ### on-conflict
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
136
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
137 Specifies the behavior, when tag conflicts occur. Possible values are: `no_conflict`, `keep_local`, `keep_remote`, `merge`
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
138
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
139 Type: onconflict enum \
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
140 Default: no_conflict \
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
141 Example: `<on-conflict>merge</on-conflict>`
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
142
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
143
283
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
144 ### filter
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
145
409
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
146 With the filter element, include and exclude filters can be specified, to control which files are synchronized. The *pull*, *push* and *archive* 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.
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
147
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
148 It is also possible to filter resources by tags. Tags can dynamically be applied to individual files. The tag filter elements contains a tag filter expression. Only files that match the filter expression are synchronized.
283
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
149
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
150 Note: The file path is relative to the directory path (and WebDAV collection) but always starts with an path separator.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
151
409
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
152 Optional elements: `<include>`, `<exclude>`, `<tags>`
283
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
153
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
154 ### include
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 Controls which files will be included by *pull* and *push*. If an include filter is specified, only files matching this filter are included.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
157
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
158 Type: regex string \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
159 Default: .* \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
160 Example:
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
161
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
162 <filter>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
163 <include>\.pdf$</include>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
164 </filter>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
165
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
166 ### exclude
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
167
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
168 Controls which files will be excluded by *pull* and *push*.
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
169
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
170 Type: regex string \
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
171 Example:
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
172
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
173 <filter>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
174 <exclude>^/secretdir</exclude>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
175 <exclude>\.DS_Store$</exclude>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
176 </filter>
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
177
409
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
178 ### tags
283
0e36bb75a732 adds dav-sync introduction and sync.xml documentation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 273
diff changeset
179
428
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
180 Filters resources by tags. Only resources, that are not a collection, are effected. If tags are not stored locally, the pull command still uses the filter.
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
181
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
182 Filter Syntax:
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
183
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
184 filter ::= operator? , (tag_list | ("(" , filter , ")")+)
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
185 tag_list ::= tag , ("," tag)*
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
186 operator ::= "&" | "|" | "1" | "0"
409
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
187
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
188 Type: tag filter expression \
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
189 Example:
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
190
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
191 <filter>
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
192 <!-- sync only resources that have one of this tags -->
428
b50ade8e7197 adds documentation for tag config
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 409
diff changeset
193 <tags>| (tag1, tag2, tag3)</tags>
409
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
194 </filter>
90a6d6952d83 adds documentation for new dav-sync features
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 320
diff changeset
195

mercurial