1CASYNC(1) casync CASYNC(1)
2
3
4
6 casync - casync Documentation
7
9 casync [OPTIONS...] make [ARCHIVE | ARCHIVE_INDEX | BLOB_INDEX] [PATH]
10 casync [OPTIONS...] extract [ARCHIVE | ARCHIVE_INDEX | BLOB_INDEX] [PATH]
11 casync [OPTIONS...] list [ARCHIVE | ARCHIVE_INDEX | DIRECTORY]
12 casync [OPTIONS...] mtree [ARCHIVE | ARCHIVE_INDEX | DIRECTORY]
13 casync [OPTIONS...] stat [ARCHIVE | ARCHIVE_INDEX | DIRECTORY] [PATH]
14 casync [OPTIONS...] digest [ARCHIVE | BLOB | ARCHIVE_INDEX | BLOB_INDEX | DIRECTORY]
15 casync [OPTIONS...] mount [ARCHIVE | ARCHIVE_INDEX] PATH
16 casync [OPTIONS...] mkdev [BLOB | BLOB_INDEX] [NODE]
17
18
20 Content-Addressable Data Synchronization Tool
21
23 casync make [ARCHIVE | ARCHIVE_INDEX] [DIRECTORY]
24 casync make [BLOB_INDEX] FILE | DEVICE
25
26
27 This will create either a .catar archive or an .caidx index for for the
28 given DIRECTORY, or a .caibx index for the given FILE or block DEVICE.
29 The type of output is automatically chosen based on the file extension
30 (this may be override with --what=). DIRECTORY is optional, and the
31 current directory will be used if not specified.
32
33 When a .caidx or .caibx file is created, a .castr storage directory
34 will be created too, by default located in the same directory, and
35 named default.castr unless configured otherwise (see --store= option).
36
37 The metadata included in the archive is controlled by the --with-* and
38 --without-* options.
39
40 casync extract [ARCHIVE | ARCHIVE_INDEX] [DIRECTORY]
41 casync extract BLOB_INDEX FILE | DEVICE
42
43
44 This will extract the contents of a .catar archive or .caidx index into
45 the specified DIRECTORY, or the contents specified by BLOB_INDEX to the
46 specified FILE or block DEVICE. DIRECTORY may be omitted, and the cur‐
47 rent directory will be used by default.
48
49 The metadata replayed from the archive is controlled by the --with-*
50 and --without-* options.
51
52 casync list [ARCHIVE | ARCHIVE_INDEX | DIRECTORY]
53
54
55 This will list all the files and directories in the specified .catar
56 archive or .caidx index, or the directory. The argument is optional,
57 and the current directory will be used by default.
58
59 The output includes the permission mask and file names:
60
61 $ casync list /usr/share/doc/casync
62 drwxr-xr-x
63 -rw-r--r-- README.md
64 -rw-r--r-- TODO
65
66 casync mtree [ARCHIVE | ARCHIVE_INDEX | DIRECTORY]
67
68
69 This is similar to list, but includes information about each entry in
70 the key=value format defined by BSD mtree(5):
71 $ casync mtree /usr/share/doc/casync README.md type=file mode=0644
72 size=7286 uid=0 gid=0 time=1498175562.000000000
73 sha256digest=af75eacac1f00abf6adaa7510a2c7fe00a4636daf9ea910d69d96f0a4ae85df4
74 TODO type=file mode=0644 size=2395 uid=0 gid=0
75 time=1498175562.000000000
76 sha256digest=316f11a03c08ec39f0328ab1f7446bd048507d3fbeafffe7c32fad4942244b7d
77
78 casync stat [ARCHIVE | ARCHIVE_INDEX | DIRECTORY] [PATH]
79
80
81 This will show detailed information about a file or directory PATH, as
82 found in either ARCHIVE or ARCHIVE_INDEX or underneath DIRECTORY. Both
83 arguments are optional. The first defaults to the current directory,
84 and the second the top-level path (.).
85
86 Example output:
87
88 $ casync stat .
89 File: .
90 Mode: drwxrwxr-x
91 FileAttr: ----------
92 FATAttr: ---
93 Offset: 0
94 Time: 2017-07-17 22:53:30.723304050
95 User: zbyszek (1000)
96 Group: zbyszek (1000)
97
98 casync digest [ARCHIVE | BLOB | ARCHIVE_INDEX | BLOB_INDEX | DIRECTORY]
99
100
101 This will compute and print the checksum of the argument. The argument
102 is optional and defaults to the current directory:
103
104 $ casync digest
105 d1698b0c4c27163284abea5d1e369b92e89dd07cb74378638849800e0406baf7
106
107 $ casync digest .
108 d1698b0c4c27163284abea5d1e369b92e89dd07cb74378638849800e0406baf7
109
110 casync mount [ARCHIVE | ARCHIVE_INDEX] PATH
111
112
113 This will mount the specified .catar archive or .caidx index at the
114 specified PATH, using the FUSE protocol.
115
116 casync mkdev [BLOB | BLOB_INDEX] [NODE]
117
118
119 This will create a block device NODE with the contents specified by the
120 .caibx BLOB_INDEX or just the file or block device BLOB, using the NBD
121 protocol.
122
123 Example:
124
125 $ sudo casync -v mkdev README.md
126 Attached: /dev/nbd0
127
128 (in another terminal)
129 $ sudo head -n1 /dev/nbd0
130 # casync — Content Addressable Data Synchronizer
131
132 When casync mkdev is killed, the device is destroyed.
133
135 General options:
136
137 --help, -h
138 Show terse help output
139
140 --verbose, -v
141 Show terse status information during runtime
142
143 --store=PATH
144 The primary chunk store to use
145
146 --extra-store=<PATH>
147 Additional chunk store to look for chunks in
148
149 --chunk-size=<[MIN:]AVG[:MAX]>
150 The minimal/average/maximum number of bytes in a chunk
151
152 --digest=<DIGEST>
153 Pick digest algorithm (sha512-256 or sha256)
154
155 --compression=<COMPRESSION>
156 Pick compression algorithm (zstd, xz or gzip)
157
158 --seed=<PATH>
159 Additional file or directory to use as seed
160
161 --rate-limit-bps=<LIMIT>
162 Maximum bandwidth in bytes/s for remote communication
163
164 --exclude-nodump=no
165 Don't exclude files with chattr(1)'s +d nodump flag when creat‐
166 ing archive
167
168 --exclude-submounts=yes
169 Exclude submounts when creating archive
170
171 --reflink=no
172 Don't create reflinks from seeds when extracting
173
174 --hardlink=yes
175 Create hardlinks from seeds when extracting
176
177 --punch-holes=no
178 Don't create sparse files when extracting
179
180 --delete=no
181 Don't delete existing files not listed in archive after extrac‐
182 tion
183
184 --undo-immutable=yes
185 When removing existing files, undo chattr(1)'s +i 'immutable'
186 flag when extracting
187
188 --seed-output=no
189 Don't implicitly add pre-existing output as seed when extracting
190
191 --recursive=no
192 List non-recursively
193
194 --uid-shift=<yes|SHIFT>
195 Shift UIDs/GIDs
196
197 --uid-range=<RANGE>
198 Restrict UIDs/GIDs to range
199
200 Input/output selector:
201
202 --what=archive
203 Operate on archive file
204
205 --what=archive-index
206 Operate on archive index file
207
208 --what=blob
209 Operate on blob file
210
211 --what=blob-index
212 Operate on blob index file
213
214 --what=directory
215 Operate on directory
216
217 Archive feature sets:
218
219 --with=best
220 Store most accurate information
221
222 --with=unix
223 Store UNIX baseline information
224
225 --with=fat
226 Store FAT information
227
228 --with=chattr
229 Store chattr(1) file attributes
230
231 --with=fat-attrs
232 Store FAT file attributes
233
234 --with=privileged
235 Store file data that requires privileges to restore
236
237 --with=fuse
238 Store file data that can exposed again via 'casync mount'
239
240 (and similar: --without=fat-attrs, --without=privileged, ...)
241
242 Individual archive features:
243
244 --with=<16bit-uids>
245 Store reduced 16bit UID/GID information
246
247 --with=<32bit-uids>
248 Store full 32bit UID/GID information
249
250 --with=<user-names>
251 Store user/group names
252
253 --with=<sec-time>
254 Store timestamps in 1s granularity
255
256 --with=<usec-time>
257 Store timestamps in 1µs granularity
258
259 --with=<nsec-time>
260 Store timestamps in 1ns granularity
261
262 --with=<2sec-time>
263 Store timestamps in 2s granularity
264
265 --with=<read-only>
266 Store per-file read only flag
267
268 --with=<permissions>
269 Store full per-file UNIX permissions
270
271 --with=<symlinks>
272 Store symbolic links
273
274 --with=<device-nodes>
275 Store block and character device nodes
276
277 --with=<fifos>
278 Store named pipe nodes
279
280 --with=<sockets>
281 Store AF_UNIX file system socket nodes
282
283 --with=<flag-hidden>
284 Store FAT hidden file flag
285
286 --with=<flag-system>
287 Store FAT system file flag
288
289 --with=<flag-archive>
290 Store FAT archive file flag
291
292 --with=<flag-append>
293 Store append-only file flag
294
295 --with=<flag-noatime>
296 Store disable access time file flag
297
298 --with=<flag-compr>
299 Store enable compression file flag
300
301 --with=<flag-nocow>
302 Store disable copy-on-write file flag
303
304 --with=<flag-nodump>
305 Store disable dumping file flag
306
307 --with=<flag-dirsync>
308 Store synchronous directory flag
309
310 --with=<flag-immutable>
311 Store immutable file flag
312
313 --with=<flag-sync>
314 Store synchronous file flag
315
316 --with=<flag-nocomp>
317 Store disable compression file flag
318
319 --with=<flag-projinherit>
320 Store project quota inheritance flag
321
322 --with=<subvolume>
323 Store btrfs subvolume information
324
325 --with=<subvolume-ro>
326 Store btrfs subvolume read-only property
327
328 --with=<xattrs>
329 Store extended file attributes
330
331 --with=<acl>
332 Store file access control lists
333
334 --with=<selinux>
335 Store SElinux file labels
336
337 --with=<fcaps>
338 Store file capabilities
339
340 (and similar: --without=16bit-uids, --without=32bit-uids, ...)
341
343 The various --with= and --without= parameters control the precise set
344 of metadata to store in the archive, or restore when extracting. These
345 flags only apply if casync operates on the file system level.
346
347
348
349
3501 Jul 12, 2018 CASYNC(1)