{"id":19000914,"url":"https://github.com/firasdib/snapper","last_synced_at":"2025-10-28T14:34:31.654Z","repository":{"id":196570153,"uuid":"696421667","full_name":"firasdib/snapper","owner":"firasdib","description":"Probably the best SnapRAID runner.","archived":false,"fork":false,"pushed_at":"2024-07-24T11:27:42.000Z","size":52,"stargazers_count":16,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-17T07:17:38.942Z","etag":null,"topics":["snapraid","snapraid-configuration","snapraid-sync"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firasdib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-09-25T17:56:49.000Z","updated_at":"2025-04-09T10:26:58.000Z","dependencies_parsed_at":"2023-10-10T21:36:18.756Z","dependency_job_id":"d260d4cd-1e65-44b0-aca3-39d8d2bbdbf6","html_url":"https://github.com/firasdib/snapper","commit_stats":null,"previous_names":["firasdib/snapper"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firasdib%2Fsnapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firasdib%2Fsnapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firasdib%2Fsnapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firasdib%2Fsnapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firasdib","download_url":"https://codeload.github.com/firasdib/snapper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250285695,"owners_count":21405297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["snapraid","snapraid-configuration","snapraid-sync"],"created_at":"2024-11-08T18:08:48.595Z","updated_at":"2025-10-28T14:34:31.560Z","avatar_url":"https://github.com/firasdib.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :turtle: Snapper\n\nSnapper is a simple python script that executes [SnapRAID](https://github.com/amadvance/snapraid) in order to sync and scrub the array. Inspired by the great [snapraid-aio-script](https://github.com/auanasgheps/snapraid-aio-script) with a limited feature set.\n\nThe reason I created this is that I wanted more granular control of how my setup worked, which consequently means, this script is opinionated.\n\n## Features\n\n- Sanity checks the array\n- Runs `touch` if necessary\n- Runs `diff` before attempting to `sync`\n- Allows you to pre-hash before syncing\n- Allows you to automatically re-run `sync` if snapraid recommends it\n- Allows you to run snapraid with a lower priority to keep server and drives responsive\n- Allows you to abort execution if configurable thresholds are broken\n- Allows you to `scrub` after `sync`\n- Allows delay of `scrub` job to every N invocations\n- Logs the raw snapraid output as well as formatted text\n- Creates a nicely formatted report and sends it via email or discord\n- Provides live insight into the sync/scrub process in Discord\n- Spin down selected hard drives after script completion\n\n**This project is a work in progress, and can change at any time.**\n\nI welcome bugfixes and contributions, but be aware that I will not merge PRs that I do not feel do not fit the usage of this tool.\n\n## Requirements\n- SnapRAID 12.2 or later\n- Python 3.7 or later\n\n## How to use\n- Install the necessary dependencies by running `pip3 install -r requirements.txt`\n- Download the [latest release](https://github.com/firasdib/snapper/releases/latest) of this project, or clone the git project.\n- Copy or rename `config.json.example` to `config.json`\n- Run the script via `python3 snapper.py`\n\nYou may run the script with the `--force` flag to force a sync/scrub and ignore any thresholds or sanity checks.\n\n## Configuration\n\nA `config.json` file is required and expected to be in the same root as this script. \n\nPlease read through the [json schema](config.schema.json) to understand the exact details of each property. If you're not fluent in json schema (I don't blame you), you could use something like [this](https://json-schema.app/view/%23?url=https%3A%2F%2Fraw.githubusercontent.com%2Ffirasdib%2Fsnapper%2Fmain%2Fconfig.schema.json) to get a better idea of the different options.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirasdib%2Fsnapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirasdib%2Fsnapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirasdib%2Fsnapper/lists"}