CASYNC(1)
okay bestie, come sit down, we're reading the casync manual together and you're gonna understand all of it, no cap π«Ά
β¨ NAME β¨
casync β casync Documentation
π SYNOPSIS π
casync [OPTIONS...] make [ARCHIVE | ARCHIVE_INDEX | BLOB_INDEX] [PATH]
casync [OPTIONS...] extract [ARCHIVE | ARCHIVE_INDEX | BLOB_INDEX] [PATH]
casync [OPTIONS...] list [ARCHIVE | ARCHIVE_INDEX | DIRECTORY]
casync [OPTIONS...] mtree [ARCHIVE | ARCHIVE_INDEX | DIRECTORY]
casync [OPTIONS...] stat [ARCHIVE | ARCHIVE_INDEX | DIRECTORY] [PATH]
casync [OPTIONS...] digest [ARCHIVE | BLOB | ARCHIVE_INDEX | BLOB_INDEX | DIRECTORY]
casync [OPTIONS...] mount [ARCHIVE | ARCHIVE_INDEX] PATH
casync [OPTIONS...] mkdev [BLOB | BLOB_INDEX] [NODE]
casync [OPTIONS...] gc BLOB_INDEX | ARCHIVE_INDEX ...
π DESCRIPTION π
Content-Addressable Data Synchronization Tool.
That's the whole description, bestie. It's giving minimalist icon. The rest of the page is where the lore lives π
π COMMANDS π
π¦ casync make π¦
casync make [ARCHIVE | ARCHIVE_INDEX] [DIRECTORY]
casync make [BLOB_INDEX] FILE | DEVICE
Okay so this one creates stuff. It'll make either a .catar archive or a .caidx index for the DIRECTORY you hand it, or a .caibx index for the FILE or block DEVICE you hand it.
The type of output? Chosen automatically, based on the file extension β no manual picking needed β but you can override that with --what=. And DIRECTORY is optional, so if you don't specify one, the current directory gets used. slay.
When a .caidx or .caibx file is created, a .castr storage directory gets created too, by default in the same directory, named default.castr β unless you configured it otherwise (see the --store= option, we'll get to her).
Which metadata ends up in the archive is controlled by the --with-* and --without-* options. you're in charge, periodt
π¦ casync extract π¦
casync extract [ARCHIVE | ARCHIVE_INDEX] [DIRECTORY]
casync extract BLOB_INDEX FILE | DEVICE
This is the reverse of make, the β¨unmakeβ¨. It extracts the contents of a .catar archive or .caidx index into the DIRECTORY you specify, or it puts the contents specified by BLOB_INDEX into the FILE or block DEVICE you specify.
DIRECTORY can be omitted β if you skip it, the current directory is the default. same energy as make, love that for us.
Which metadata gets replayed from the archive is controlled by the --with-* and --without-* options.
π¦ casync list π¦
casync list [ARCHIVE | ARCHIVE_INDEX | DIRECTORY]
Lists every file and directory inside the .catar archive or .caidx index you point at, or inside the directory. The argument is optional and defaults to the current directory.
The output includes the permission mask and the file names, like:
$ casync list /usr/share/doc/casync
drwxr-xr-x
-rw-r--r-- README.md
-rw-r--r-- TODO
π¦ casync mtree π¦
casync mtree [ARCHIVE | ARCHIVE_INDEX | DIRECTORY]
Basically list's glow-up cousin β same idea, except it includes info about every entry in the key=value format defined by BSD mtree(5):
$ casync mtree /usr/share/doc/casync
. type=dir mode=0755 uid=0 gid=0 time=1500343585.721189650
README.md type=file mode=0644 size=7286 uid=0 gid=0 time=1498175562.000000000 sha256digest=af75eacac1f00abf6adaa7510a2c7fe00a4636daf9ea910d69d96f0a4ae85df4
TODO type=file mode=0644 size=2395 uid=0 gid=0 time=1498175562.000000000 sha256digest=316f11a03c08ec39f0328ab1f7446bd048507d3fbeafffe7c32fad4942244b7d
π¦ casync stat π¦
casync stat [ARCHIVE | ARCHIVE_INDEX | DIRECTORY] [PATH]
This one shows you detailed info about a file or directory PATH, as found in either ARCHIVE or ARCHIVE_INDEX, or underneath DIRECTORY. Both arguments are optional β the first defaults to the current directory, and the second defaults to the top-level path (.).
Example output, because seeing it hits different:
$ casync stat .
File: .
Mode: drwxrwxr-x
FileAttr: ----------
FATAttr: ---
Offset: 0
Time: 2017-07-17 22:53:30.723304050
User: zbyszek (1000)
Group: zbyszek (1000)
π¦ casync digest π¦
casync digest [ARCHIVE | BLOB | ARCHIVE_INDEX | BLOB_INDEX | DIRECTORY]
Computes and prints the checksum of the argument. The argument is optional and defaults to the current directory:
$ casync digest
d1698b0c4c27163284abea5d1e369b92e89dd07cb74378638849800e0406baf7
$ casync digest .
d1698b0c4c27163284abea5d1e369b92e89dd07cb74378638849800e0406baf7
see, same answer, the default is doing exactly what it says π
π¦ casync mount π¦
casync mount [ARCHIVE | ARCHIVE_INDEX] PATH
Mounts the specified .catar archive or .caidx index at the specified PATH, using the FUSE protocol. yes bestie, FUSE. iconic behaviour.
π¦ casync mkdev π¦
casync mkdev [BLOB | BLOB_INDEX] [NODE]
Creates a block device NODE with the contents specified by the .caibx BLOB_INDEX, or just the file or block device BLOB, using the NBD protocol.
Example time:
$ sudo casync -v mkdev README.md
Attached: /dev/nbd0
and then, in another terminal:
$ sudo head -n1 /dev/nbd0
# casync β Content Addressable Data Synchronizer
β οΈ heads up: when casync mkdev is killed, the device is destroyed. so, like, be aware of that π
π¦ casync gc π¦
casync gc ARCHIVE_INDEX | BLOB_INDEX ...
The garbage collector β¨. This removes all the chunks that aren't used by one of the indices you specify (and yes, you can pass one or more blob and archive indices). If --store isn't given, the default store for the first index gets used.
Use her to prune unused chunks out of a shared chunk store. spring cleaning energy π§Ή
π OPTIONS π
πΈ General options πΈ
--help,-hβ Show terse help output--versionβ Show brief version information--log-level=<LEVEL>,-lβ Set log level (debug,info,err)--verbose,-vβ Show terse status information during runtime--dry-run,-nβ Only print what would be removed withgc--store=PATHβ The primary chunk store to use--extra-store=<PATH>β Additional chunk store to look for chunks in--chunk-size=<[MIN:]AVG[:MAX]>β The minimal/average/maximum number of bytes in a chunk--digest=<DIGEST>β Pick digest algorithm (sha512-256orsha256)--compression=<COMPRESSION>β Pick compression algorithm (zstd,xzorgzip)--seed=<PATH>β Additional file or directory to use as seed--cache=<PATH>β Directory to use as encoder cache--cache-auto,-cβ Pick encoder cache directory automatically--rate-limit-bps=<LIMIT>β Maximum bandwidth in bytes/s for remote communication--exclude-nodump=noβ Don't exclude files withchattr(1)'s+dnodump flag when creating archive--exclude-submounts=yesβ Exclude submounts when creating archive--exclude-file=noβ Don't respect.caexcludefiles in the file tree--reflink=noβ Don't create reflinks from seeds when extracting--hardlink=yesβ Create hardlinks from seeds when extracting--punch-holes=noβ Don't create sparse files when extracting--delete=noβ Don't delete existing files not listed in archive after extraction--undo-immutable=yesβ When removing existing files, undochattr(1)'s+i'immutable' flag when extracting--seed-output=noβ Don't implicitly add pre-existing output as seed when extracting--recursive=noβ List non-recursively--mkdir=noβ Don't automatically create mount directory if it is missing--uid-shift=<yes|SHIFT>β Shift UIDs/GIDs--uid-range=<RANGE>β Restrict UIDs/GIDs to range
πΈ Input/output selector πΈ
--what=archiveβ Operate on archive file--what=archive-indexβ Operate on archive index file--what=blobβ Operate on blob file--what=blob-indexβ Operate on blob index file--what=directoryβ Operate on directory--what=helpβ Print a list of allowed values (and terminate the program)
πΈ Turn on archive feature sets πΈ
--with=bestβ Store most accurate information--with=unixβ Store UNIX baseline information--with=fatβ Store FAT information--with=chattrβ Storechattr(1)file attributes--with=fat-attrsβ Store FAT file attributes--with=privilegedβ Store file data that requires privileges to restore--with=fuseβ Store file data that can exposed again via'casync mount'
To turn archive features off, --without=β¦ may be used, such as --without=fat-attrs, --without=privileged, etc. To disable all optional features, --without=all may be used. (The positive form --with=all does not make sense, because some features are conflicting. To enable the maximum set of information, use --with=best.) that's the tea β
πΈ Individual archive features πΈ
--with=<16bit-uids>β Store reduced 16bit UID/GID information--with=<32bit-uids>β Store full 32bit UID/GID information--with=<user-names>β Store user/group names--with=<sec-time>β Store timestamps in 1s granularity--with=<usec-time>β Store timestamps in 1Β΅s granularity--with=<nsec-time>β Store timestamps in 1ns granularity--with=<2sec-time>β Store timestamps in 2s granularity--with=<read-only>β Store per-file read only flag--with=<permissions>β Store full per-file UNIX permissions--with=<symlinks>β Store symbolic links--with=<device-nodes>β Store block and character device nodes--with=<fifos>β Store named pipe nodes--with=<sockets>β StoreAF_UNIXfile system socket nodes--with=<flag-hidden>β Store FAT "hidden" file flag--with=<flag-system>β Store FAT "system" file flag--with=<flag-archive>β Store FAT "archive" file flag--with=<flag-append>β Store "append-only" file flag--with=<flag-noatime>β Store "disable access time" file flag--with=<flag-compr>β Store "enable compression" file flag--with=<flag-nocow>β Store "disable copy-on-write" file flag--with=<flag-nodump>β Store "disable dumping" file flag--with=<flag-dirsync>β Store "synchronous" directory flag--with=<flag-immutable>β Store "immutable" file flag--with=<flag-sync>β Store "synchronous" file flag--with=<flag-nocomp>β Store "disable compression" file flag--with=<flag-projinherit>β Store "project quota inheritance" flag--with=<subvolume>β Store btrfs subvolume information--with=<subvolume-ro>β Store btrfs subvolume read-only property--with=<xattrs>β Store extended file attributes--with=<acl>β Store file access control lists--with=<selinux>β Store SElinux file labels--with=<fcaps>β Store file capabilities--with=<quota-projid>β Store ext4/XFS quota project ID
(and similar: --without=16bit-uids, --without=32bit-uids, ...) β so literally every one of these has a mirror-flip --without= twin, iykyk πͺ
π ARCHIVE FEATURES π
So all those --with= and --without= parameters are what control the precise set of metadata that gets stored in the archive β or restored when you're extracting. chef's kiss, very precise, very demure.
π‘ but bestie, listen: these flags only apply if casync operates on the file system level. so don't come for them if you're doing blob stuff. π«Ά
β¨ EXCLUDING FILES AND DIRECTORIES FROM ARCHIVING β¨
okay bestie, listen up, because this part is lowkey the most important vibe check in the whole page π when you're generating an archive or an index from a file system directory tree, some stuff gets yeeted by default and other stuff you can choose to yeet. Here's the full tea:
- Virtual API file systems exposed by the kernel get excluded UNCONDITIONALLY, no discussion, no appeal β we're talking
procfs,sysfs,cgroupfs,devpts⦠but NOTtmpfs/devtmpfs, those two are fine and stay. Periodt. - Depending on whether symlinks, device nodes, fifos and sockets are enabled for archiving with
--with=and--without=, file nodes of those types get excluded. So like, if you said no to a type, its nodes are not invited to the party π ββοΈ - By default, files and directories with the
+dchattr(1)flag set are excluded. But you can turn that behaviour off with--exclude-nodump=noif you want them in there. Your call, bestie. - Optionally, files and directories contained in submounts of the specified file system tree get excluded β but only if you specifically ask with
--exclude-submounts=yes. Otherwise they're staying. π«Ά - By default, anything listed in
.caexcludefiles anywhere in the file hierarchy gets excluded. You can turn interpretation of these files off entirely with--exclude-file=no. These files work kinda like git's.gitignoreconcept, and here's exactly how they behave:- They're read as a text file, where each line is either empty or starts with
#(in which case it has no effect at all β that's your commenting mechanism, use it, it's iconic β¨), or it lists a globbing path pattern of files/directories to ignore. - If a line contains no
/character, the line applies to the directory the.caexcludefile is located in as well as all child directories of it. So it's giving "me and my whole bloodline" energy. - If it contains at least one
/character, it is considered strictly relative to the directory the.caexcludefile is located in. No wandering off, it knows exactly where it lives. .caexcludefiles may appear in any directory of the file system tree that is archived. BUT β they have no effect when placed in directories that are marked for exclusion via.caexcludefiles placed further up in the directory tree. Like girl, you're already gone, nobody's reading your notes π- When a line ends in a
/character, it applies to directories only, and not regular files or other file node types. Directories-only, we love a specialist π - If a line is prefixed with a
!character, matching files are excluded from the exclusion β i.e. the effect of other matching lines that are not prefixed like this is cancelled for matching files. So it's a "not me tho" pass. π !lines unconditionally take precedence over lines not marked like this. Unconditional. No arguments. It ate and left no crumbs.- Moreover, lines prefixed with
!also cancel the effect of patterns in.caexcludefiles placed in directories further up the tree. Yeah, it reaches up. Powerful behaviour fr fr π
- They're read as a text file, where each line is either empty or starts with
and that's the whole page, bestie, we made it π¦ this was casync, manual section 1, dated Aug 23, 2026 β go forth and archive responsibly, mwah ππΈ
π¦ where this page comes from
- ubuntu stonking: casync 2+20201210-2.2 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms