Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction to fileset

fileset checks that a copy of a directory tree is the same as the original. You use it for two things:

  • Verify transfers and backups made with other tools, such as rsync or rclone.
  • Check important data sets in storage for bitrot. Bitrot is data that changes on disk without anyone writing to it.

fileset is a separate tool, and you do not need irsync to use it. What it records and checks is its own code, not irsync’s. That is on purpose: a check made with the same code as the copy can repeat the copy’s mistakes. The one part they share is the wildcard matcher of fileset list. This part of the book assumes you have never used irsync.

The idea

You record a manifest of the tree once. A manifest is a small database that holds each file’s checksum and metadata. Later you check a tree against it. fileset lists every difference. It changes nothing.

fileset init  ~/Photos     record a manifest of the tree
fileset check <copy>       compare a copy, or the same tree later, with it
fileset update ~/Photos    bring the manifest up to date after real changes
fileset list ~/Photos      print what the manifest holds

The manifest is a file named .fileset.sqlite at the top of the tree. A copy tool that copies the whole tree copies the manifest too, so the copy can check itself.

Install

fileset comes in the same packages as irsync, so every way of installing irsync installs it too. The quickest is the install script:

curl --proto '=https' --tlsv1.2 -LsSf https://irsync.org/install.sh | sh

Until the first stable release, v0.1.0, is out, add --beta straight after sh -s --. The script puts the programs in ~/.local/bin and the man pages in ~/.local/share/man, so man fileset works. If ~/.local/bin is not on PATH, it says how to add it; on Linux, logging out and in again is usually enough. To remove it all, run it with --uninstall (and --beta, until v0.1.0).

Homebrew (brew install irsync-dev/tap/irsync) and apt and dnf (dist.irsync.org) work the same way from v0.1.0 on. The tarballs on the GitHub Releases page work too. All of them cover Linux on x86_64 and arm64 and macOS on Apple Silicon.

On other machines, build fileset from source. This needs Rust; get it from https://rustup.rs.

cargo install --git https://github.com/irsync-dev/irsync fileset

cargo install installs no man pages.

Install it on every machine where you want to run a check.

Where to go next