Skip to main content

A tool for validating and verifying backup files.

Project description

Universal Backup Validator

Universal Backup Validator is an open-source tool designed to ensure the integrity of your backup files. It validates .zip, .tar, and .7z files, performs checksum verification, and generates comprehensive reports in multiple formats.


Features

  • Validate the integrity of .zip, .tar, and .7z files.
  • Checksum verification using popular algorithms like sha256 and md5.
  • Multi-threaded directory validation for improved performance.
  • Generate reports in multiple formats: JSON, CSV, and HTML.
  • Configurable log rotation to manage log storage.

Installation

Prerequisites

  • Python 3.7 or later.

Clone the Repository

git clone https://github.com/tudos4/UniversalBackupValidator.git
cd UniversalBackupValidator

Set Up a Virtual Environment

python -m venv env
source env/bin/activate  # On Windows, use `env\Scripts\activate`
pip install -r requirements.txt

Usage
Validate a Single File

To validate a single .zip file:

python src/cli.py --file test_files/valid.zip --checksum <checksum> --algorithm sha256

Validate Files in a Directory

To validate all supported files in a directory:

python src/cli.py --directory test_files_batch --report validation_report.json --report-format json

CLI Options

--file            Path to a file to validate.
--directory       Path to a directory containing files to validate.
--checksum        Expected checksum value for validation.
--algorithm       Checksum algorithm (default: sha256).
--report          Path to save the consolidated report.
--report-format   Format of the report (json, csv, html). Default is json.
--config          Path to a configuration JSON file.
--max-logs        Maximum number of logs to retain (default: 5).
--log-directory   Directory to store logs.

Examples
Validate a .tar file with a checksum:

python src/cli.py --file test_files/valid.tar --checksum <checksum_value> --algorithm md5

Generate a CSV Report for a Directory:

python src/cli.py --directory test_files_batch --report validation_report.csv --report-format csv

Generate an HTML Report:

python src/cli.py --directory test_files_batch --report validation_report.html --report-format html

Contribution

We welcome contributions to improve Universal Backup Validator! Follow these steps to contribute:

    Fork the Repository:
        Go to the GitHub repository.
        Click the "Fork" button.

    Create a New Branch:

git checkout -b my-feature-branch

Make Your Changes:

    Add your feature or fix bugs.

Commit Your Changes:

git commit -m "Describe your changes"

Push the Changes:

    git push origin my-feature-branch

    Open a Pull Request:
        Go to the original repository on GitHub.
        Open a pull request describing your changes.

License

This project is licensed under the MIT License. See the LICENSE file for more details.
Acknowledgments

    Developed by tudos4.
    Inspired by the need for robust backup file validation.
    Powered by Python and the colorama library for enhanced CLI output.


---

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

universalbackupvalidator-1.0.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

UniversalBackupValidator-1.0.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file universalbackupvalidator-1.0.0.tar.gz.

File metadata

File hashes

Hashes for universalbackupvalidator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9072713412e7aea6d15e1a6a7199e04739df7d1b15ba20051e937f3e2a1eae70
MD5 0d7108a7c40e884415725c5c5139e475
BLAKE2b-256 0604139f89d3f3c0dcfa8cf8b84e855e88eee6b9975c367176f1fd4a9c63675f

See more details on using hashes here.

File details

Details for the file UniversalBackupValidator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for UniversalBackupValidator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fceeccbb1bf400a13d5917ddf5575a9bcde7b511b41ce4c4f8eb98d730e730ba
MD5 abb2ab569a993f2fd13e9d8bb8ed8951
BLAKE2b-256 0daaa411c48e9a9f1f3bce6b44d6358372b19af72b850773c1fccc93f70d32bc

See more details on using hashes here.

Supported by

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