kissback 0.20.10 - keep it simple stupid backup
===============================================

kissback backs a directory tree - or an S3 bucket - up to a local directory,
an sftp server or an S3 bucket, and restores it, checks it, writes it out as a
tar archive, and prunes and compacts what it has stored. kissmount mounts a backup as a read-only
filesystem so it can be looked at and copied out of with ordinary tools instead
of being restored.

This is kissback written in Rust. It takes the same options, gives the same
exit codes and messages, and reads and writes the same backups as the C build
0.9.2, byte for byte: a backup taken by either can be restored, checked,
mounted, pruned or added to by the other, so the two can be mixed on one
backup directory and swapped for each other without converting anything. The
few places where they differ are listed in DIVERGENCES. Two are on purpose:
`kissback -version` says 0.20.10 here and 0.9.x in C, so a machine can be asked
which one it runs; and S3, as a source and as a backup directory, is this
build's alone - the backups it makes are ordinary ones the C build reads. So
is encryption (-passphrasefile), whose backups the C build cannot read and
does not touch; -mode copy, which copies a backup directory's backups to
another - locally, over sftp or into a bucket; and packed backup directories
(-pack, -mode repack), which put a run's stored files into a bucket as a few
tar archives instead of an object each.

The documentation is the two manual pages, man/kissback.7 and man/kissmount.7,
which are the C build's. This file is only what they do not cover: what the
software needs and how to build it.


What it needs
-------------

LINUX, as the C build does: the code uses openat(2), renameat(2), flock(2) and
O_NOFOLLOW throughout, and kissmount speaks the kernel's FUSE protocol.

  Rust 1.98 or later, with cargo
  a C compiler and pkg-config     some crates' build scripts use them to find
                                  the system libraries and read their headers
  libssh2, liblzma (xz), libzstd, libcrypto (OpenSSL)
                                  with their headers and pkg-config files - the
                                  four libraries the C build links, linked
                                  dynamically in the same way; OpenSSL 3 also
                                  does the encryption (X25519, ChaCha20-
                                  Poly1305, HKDF, scrypt). liblzma must be
                                  5.8.0 or later here (the C build takes 5.2.0)
  libcurl                         the same, for S3 (-s3source); the C build
                                  has no S3 and does not link it

Where pkg-config cannot find libssh2 or libcurl, or finds a liblzma older
than 5.8.0, the crates do not stop: they compile a copy of that library
bundled in vendor/ and link it in statically. That build works, but it is not
the one that was tested, and the library it carries is not updated with the
system's. To see which you have, `ldd target/release/kissback` should list
libssh2.so, liblzma.so, libzstd.so, libcrypto.so and libcurl.so.

kissmount needs no libfuse: it speaks the FUSE protocol itself. It needs
/dev/fuse, and to mount as a user other than root, fusermount3 (the fuse3
package's), as the C build's libfuse does.

Every Rust crate the build uses is in vendor/, so building needs no network.
DEPENDENCIES lists each one and why it is there.


Building
--------

  cargo build --release --offline --frozen

builds both programs, as target/release/kissback and target/release/kissmount.
--offline and --frozen hold the build to vendor/ and Cargo.lock, so it compiles
exactly the crates this release was tested with. There is no install step: the
two binaries are self-contained, and where they and the manual pages go is
yours to decide.

  cargo test --release --offline --frozen

runs the unit tests. The integration harnesses - the ones that take real
backups, cut connections and fill disks - live in the C build's source and are
run against these binaries from there.


Licence
-------

GNU General Public License, version 3 or later; see license.txt.
