FilesDB — utilities to handle file metadata
The following data should be stored for each file:
- full path (relative to scan point)
- a number of hashes (md5, sha-1, xxh32, xxh64, git-sha, ssdeep, sdhash, ...)
- Scan identifier
Less useful data that can also be stored:
- dates (creation, modification, access)
Each database should also keep track of all the commands (scans) that were used to add content.
The data model should be extensible (for example, more hashes may be added in later versions), so the data storage should take this parameter into account.
The exact set of commands will be determined later.
However, the following should give a reasonable first approach.
The commands can be implemented as subcommands, like in git.
- provide help
- display the software version
- list all scans in a database
- display statistics about the DB contents
- scan a location and add to the database
- rescan a location and update the database according to added, changed, and removed files
- quick-scan a location (ignore hashes) and add to the DB
- search for a file, according to criteria
All the information is stored into an SQL database.
Individual SQLite files seem to be the perfect point between functionality and complexity, allowing all operations on data and easy transfer between systems.
All the command-line utilities should accept a "-d|--database <arg>" to specify the location of this file.