{ "info": { "author": "Christian Zangl", "author_email": "laktak@cdak.net", "bugtrack_url": null, "classifiers": [], "description": "# chkbit\n\nchkbit is a lightweight **bitrot detection tool**.\n\nbitrot (a bit flipping in your data) can occur\n\n- at a low level on the storage media through decay (hdd/sdd)\n- at a high level in the os or firmware through bugs\n\nchkbit is independent of the file system and can help you detect bitrot on you primary system, on backups and in the cloud.\n\n## Installation\n\n```\npip install --user chkbit\n```\n\nOr in its own environment:\n\n```\npipx install chkbit\n```\n\n## Usage\n\nRun `chkbit -u PATH` to create/update the chkbit index.\n\nchkbit will\n\n- create a `.chkbit` index in every subdirectory of the path it was given.\n- update the index with md5 hashes for every file.\n- report bitrot for files that rotted since the last run (check the exit status).\n\n```\nusage: chkbit.py [-h] [-u] [-f] [-q] [-v] PATH [PATH ...]\n\nChecks files for bitrot. See https://github.com/laktak/chkbit-py\n\npositional arguments:\n PATH\n\noptional arguments:\n -h, --help show this help message and exit\n -u, --update update indices (without this chkbit will only verify files)\n -f, --force force update of damaged items\n -q, --quiet quiet, don't show progress/information\n -v, --verbose verbose output\n\nStatus codes:\n ROT: error, bitrot detected\n EIX: error, index damaged\n old: warning, file replaced by an older version\n add: add to index\n upd: file updated\n ok : check ok\n skp: skipped (see .chkbitignore)\n EXC: internal exception\n```\n\n## Repair\n\nchkbit cannot repair bitrot, its job is simply to detect it.\n\nYou should\n\n- backup regularly.\n- run chkbit *before* each backup.\n- check for bitrot on the backup media.\n- in case of bitrot *restore* from a checked backup.\n\n## Ignore files\n\nAdd a `.chkbitignore` file containing the names of the files/directories you wish to ignore\n\n- each line should contain exactly one name\n- lines starting with `#` are skipped\n\n## FAQ\n\n### Should I run `chkbit` on my whole drive?\n\nYou would typically run it only on *content* that you keep for a long time (e.g. your pictures, music, videos).\n\n### Why is chkbit placing the index in `.chkbit` files (vs a database)?\n\nThe advantage of the .chkbit files is that\n\n- when you move a directory the index moves with it\n- when you make a backup the index is also backed up\n\nThe disadvantage is that you get hidden `.chkbit` files in your content folders.\n\n### How does chkbit work?\n\nchkbit operates on files.\n\nWhen run for the first time it records a md5 hash of the file contents as well as the file modification time.\n\nWhen you run it again it first checks the modification time,\n\n- if the time changed (because you made an edit) it records a new md5 hash.\n- otherwise it will compare the current md5 to the recorded value and report an error if they do not match.\n\n### Can I test if chkbit is working correctly?\n\nOn Linux/OS X you can try:\n\nCreate test and set the modified time:\n```\n$ echo foo1 > test; touch -t 201501010000 test\n$ chkbit -u .\na ./test\n$\n```\n`a` indicates the file was added.\n\nNow update test with a new modified:\n```\n$ echo foo2 > test; touch -t 201501010001 test # update test & modified\n$ chkbit -u .\nu ./test\n$\n```\n\n`u` indicates the file was updated.\n\nNow update test with the same modified to simulate bitrot:\n```\n$ echo foo3 > test; touch -t 201501010001 test\n$ chkbit -u .\nE ./test\nchkbit detected bitrot in these files:\n./test\nerror: detected 1 file(s) with bitrot!\n$\n```\n\n`E` indicates an error.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/laktak/chkbit-py", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "chkbit", "package_url": "https://pypi.org/project/chkbit/", "platform": "", "project_url": "https://pypi.org/project/chkbit/", "project_urls": { "Homepage": "https://github.com/laktak/chkbit-py" }, "release_url": "https://pypi.org/project/chkbit/2.0.0/", "requires_dist": null, "requires_python": ">=3.6.0", "summary": "chkbit is a lightweight bitrot detection tool.", "version": "2.0.0" }, "last_serial": 5929999, "releases": { "2.0.0": [ { "comment_text": "", "digests": { "md5": "e35990f4821680dea4d8bd70f0f6a905", "sha256": "1b007b9a3e762d5941f9afc79f9ce58ed738fc1ea7f7f41f00a372ca69058a58" }, "downloads": -1, "filename": "chkbit-2.0.0.tar.gz", "has_sig": false, "md5_digest": "e35990f4821680dea4d8bd70f0f6a905", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 5734, "upload_time": "2019-10-04T20:10:22", "url": "https://files.pythonhosted.org/packages/f8/9c/3e2b786275b9e0d0d68411e688f4003db31230f130a0df9e0df01c0b641d/chkbit-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e35990f4821680dea4d8bd70f0f6a905", "sha256": "1b007b9a3e762d5941f9afc79f9ce58ed738fc1ea7f7f41f00a372ca69058a58" }, "downloads": -1, "filename": "chkbit-2.0.0.tar.gz", "has_sig": false, "md5_digest": "e35990f4821680dea4d8bd70f0f6a905", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 5734, "upload_time": "2019-10-04T20:10:22", "url": "https://files.pythonhosted.org/packages/f8/9c/3e2b786275b9e0d0d68411e688f4003db31230f130a0df9e0df01c0b641d/chkbit-2.0.0.tar.gz" } ] }