Skip to main content

Recursive Integrity Keeper

Project description

rik (Recursive Integrity Keeper)

Overview

rik (Recursive Integrity Keeper) is a Python wrapper around the par2cmdline tool. It allows recursive calculation and verification of Reed-Solomon error correction codes for your files. These codes can be used to restore file content in case of damage, making rik particularly useful for long-term archiving.

To create error correction codes, run rik create -i par2 ./ in your directory. rik will recursively process the directory contents, generating Reed-Solomon codes for each file it encounters. To verify the integrity of your files with the generated codes, use the command rik verify -i par2 ./. At the end, the comprehensive summary of results will be printed. If any corrupted files are found, the generated Reed-Solomon codes can be used to restore them.

Installation

Prerequisites

rik uses par2cmdline as its backend. Ensure that par2cmdline is installed and available in your system's PATH before proceeding.

Development version

To install the development version of rik, use the following commands:

git clone https://github.com/usert5432/rik
cd rik
python3 -m pip install -e .

PyPI version

Alternatively, rik can be installed from the PyPI repository:

python3 -m pip install rik

Usage

1. Creating Reed-Solomon Codes

To calculate Reed-Solomon codes for a directory DIR, run:

rik create -i par2 DIR

This command will recursively process the contents of the directory tree starting from DIR. For each file encountered, it will calculate Reed-Solomon error correction codes and save them in a .par2 subdirectory next to the original file.

2. Verifying File Integrity

To verify file integrity using previously calculated Reed-Solomon codes for a directory DIR, one can use:

rik verify -i par2 DIR

A comprehensive summary of the verification process will be printed at the end.

3. Customizing Redundancy Level

You can pass arguments directly to the par2cmdline command. For instance, it is possible to to specify redundancy level with:

rik create -i par2 DIR -- -r10

This argument will make par2cmdline create 10% redundancy.

4. Filtering Files

rik supports several filters to include/exclude files based on their paths and sizes. For example,

  • Calculate error correction codes only for files smaller than 100 MB:
rik create -i par2 -s '<100M' DIR
  • Calculate error correction codes only for files outside of .cache directories:
rik create -i par2 --exclude .cache DIR

License

This project is distributed under the BSD 2-Clause License - refer to the the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rik-0.0.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

rik-0.0.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file rik-0.0.1.tar.gz.

File metadata

  • Download URL: rik-0.0.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for rik-0.0.1.tar.gz
Algorithm Hash digest
SHA256 176f5340fd00786a912e032bfab6967b09988319677131cf60f702445db6534b
MD5 0c0829dcec765db5ec30bc4d8c35e432
BLAKE2b-256 e59aae48c934245f946605add44a75cc7cf57af4187316fa6e586c53e041b254

See more details on using hashes here.

File details

Details for the file rik-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rik-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for rik-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 686458d04a1b1e1a598b3ab15540f02ff80453222fbfef54b7ed85cc8c0c6d7a
MD5 b872e87286f4c893cc564c302cffc451
BLAKE2b-256 75fe86590a79d7b2f9ac83d3561bff3923570c8e6327e2b21c67b9a66314fa61

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page