Hashing

In order to not miss bit rot due to degenerating storage media the checksum database must only be updated when there were conscious modifications made to the file archive. fidx accomplishes this by never recalculating hashes for files which do not have an altered modification timestamp1 in the filesystem.

Ignore lists

fidx supports ignore lists which can be used to ignore filesystem entries by glob expressions. There's no way to manage ignore entries using the fidx command line tool. Instead, users must manipulate the database directly using their favorite sqlite database editor, such as the standard sqlite3 command line tool.

The default ignore list for a newly initialized fidx database is:

$ sqlite3 .findex
sqlite> .mode column
sqlite> .header on
sqlite> SELECT * FROM ignore;
id  path
--  -------------
1   .findex
2   .findex-shm
3   .findex-wal
4   .findexer.log
5   **/.*.swp

Updating

To update the hash database run the subcommand update:

$ fidx update

This must be run from the base directory (i.e. where the fidx initialization was performed, and the state database resides).

Verify

To verify the integrity of the archive against the stored database run the subcommand verify:

$ fidx verify

The verify subcommand will verify all files from the current subdirectory within the managed tree given the current state of the database, which means that the verify will not detect newly added files in the file system -- it works in the premise that since the latest changes in the tree the user has run an update.

To verify the entire archive the verify subcommand must be run from the base directory (the directory where the fidx database resides) or it will only verify a subtree from the current subtree.

An optional argument can be passed to the verify subcommand to specify a subset to verify. If a tree is managed under /backups, which contains a subdirectory foo, which in turn contains a subdirectory bar (i.e. /backups/foo/bar) the following would only verify files under /backups/foo/bar:

$ cd /backups/foo
$ fidx verify bar

1 In other words: fidx uses the file's modification time to detect intended updates of files. Don't try to do anything creative and abnormal with mtimes which breaks this imporant assumption.