dir-signature 0.1.0

This crate allows to create a signature (index) of a directory with files.

Crate dir_signature [] [src]

Directory Signature Library

v1

Currently whe have only implemented v1 version of signature file, it has the following limitations:

  • Only stores executable bit for files, no permissions and ownership support (this also means files can be replicated without privileges)
  • File modification times are not checked and not replicated
  • It's ascii text, so potentially 2x larger than what binary file could be

While these limitations are not enough for generic backup purposes they are fine for deploying configs and read-only images to production servers in 99% use cases. Latter was a primary use case for the library. We will probably make a more featureful format as v2 and later as deemed necessary.

Design of the format features the following things:

  • Reproducible (does not depend on order of file scan)
  • Easy to check even using a bash script (sans edge cases)
  • Usable for file synchonization
  • Can be produced and checked without loading full index into memory

Modules

v1

A module for working with version 1 of directory signature

Structs

ScannerConfig

Scanner config contains a list of directories you will scan and other settings that influence filesystem scanning

Enums

Error

Error returned from scanning and making an index

HashType

A type of hash supported by the library