Validate files are not bitrotting via checksums stored in xattrs
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Godeps
pathing
vendor
.gitignore
.pkgr.yml
LICENSE
Makefile
README.md
bitrot-scanner.go
checksumHelpers.go
config.go
filterChecksumAlgos.go
job.go
log.go
nice.go
sortedJobs.go
unsortedJobs.go
version.go
worker.go
workerEnd.go
workerIO.go
workerReset.go
workerStart.go
xattrHelpers.go

README.md

bitrot-scanner

Bitrot is a huge issue if you care about your data. This program aims to make the silent corruption a little less silent for those irreplaceable memories.

Install

Packages

From source

go get github.com/kormoc/bitrot-scanner

Usage

Generally the best way to handle this is to run bitrot-scanner via cron on a cadence that matches the importance of your data.

Simplistic Mode

This mode will create checksums for any files missing them and validate any checksums that exist. Useful if you want to create checksums and validate on the same schedule.

bitrot-scanner --progressBar /path/to/directory/1 /path/to/directory/2 ...

Advanced Mode

Splitting the creation of the checksums from the validation works best on large datasets that often have new files being created. This allows a rapid creation of new checksums, but allows the validation to happen on a different schedule.

Create checksums for files missing them

bitrot-scanner --lockfile=/var/run/bitrot-scanner.pid --skipValidation /path/to/directory/1 /path/to/directory/2 ...

Validate

bitrot-scanner --lockfile=/var/run/bitrot-scanner.pid --skipCreate /path/to/directory/1 /path/to/directory/2 ...

Hash Functions

By default, we use sha512, however you can use multiple hashes (md5,sha512). This allows you to migrate between hash types if you desire.

Valid hashes

  • md5
  • sha1
  • sha256
  • sha512