{ "info": { "author": "Thomas Sileo", "author_email": "thomas.sileo@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python" ], "description": "===========================\n Incremental-Backups-Tools\n===========================\n\nStorage agnostic incremental backups tools, building blocks for creating incremental backups utilities.\n\n* Use `pyrsync `_ (a pure Python rsync implementation with SHA256 hash) to compute patch/diff.\n* Rely on `dirtools `_ (for .gitignore like exlusion, and helpers it provides) \n\nThis project is initially designed as a foundation for `bakthat `_ incremental backups plugin, so the implementation of features like signature, encryption, storage, management of full/incremental backups is up to you.\n\nComponents\n==========\n\nDirIndex\n--------\n\n``DirIndex`` represent the state of a directory, it contains:\n\n- the list of files and subdirectories\n- and for each files, the block checksums (from ``pyrsync``)\n\nThis index should be stored (with the ``to_file`` methods, and can be retrieved latter with the ``from_file`` classmethod) each time a backup (full or incremental) is performed.\nNext time you perform an incremental backups, this index should be used for creating a ``DiffIndex``.\n\nDiffIndex\n---------\n\n``DiffIndex`` stores the changes between to ``DirIndex``.\n\nIt contains:\n\n- the list of created, updated, deleted files.\n- the list of deleted subdirectories.\n- a list containing the temporary file which contains the delta (provided by ``pyrsync``)\n- the latest ``DirIndex`` data\n\nDiffData\n~~~~~~~~\n\n``DiffData`` handle the archive creation, it need a previously generated ``DiffIndex``.\n\nThe archive (tar.gz) contains two directories:\n\n- created, where the new files are stored.\n- updated, contains the pyrsync deltas.\n\nEverything is stored at root, with the hash of the path as filename.\n\napply_diff\n----------\n\nTo apply/patch a diff for a directory, you need two things: **the archive path** (generated by ``DiffData``) and **the diff index data** (generated by ``DiffIndex``)\n\n\nInstallation\n============\n\n.. code-block::\n\n $ pip install incremental-backups-tools\n\n\nUsage\n=====\n\n.. code-block:: python\n\n from incremental_backups_tools import DirIndex, DiffIndex, DiffData, apply_diff\n from dirtools import Dir\n\n d = Dir('/home/thomas/mydir')\n DirIndex(d).to_file('/home/thomas/mydir.index')\n\n # Store the index\n\n old_dir_index_data = DirIndex.from_file('/home/thomas/mydir.index')\n\n # Make some changes in the directory\n\n dir_index_data = DirIndex(d).data()\n diff_index = DiffIndex(dir_index_data, old_dir_index_data).compute()\n diff_archive = DiffData(diff_index).create_archive('/home/thomas/mydir.diff.tgz')\n\n # Reapply these changes from the intial directory\n\n apply_diff('/home/thomas/mydir', diff_index, diff_archive)\n\n\nLicense (MIT)\n=============\n\nCopyright (c) 2013 Thomas Sileo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tsileo/incremental-backups-tools", "keywords": "incremental backups diff patch rsync", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "incremental-backups-tools", "package_url": "https://pypi.org/project/incremental-backups-tools/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/incremental-backups-tools/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/tsileo/incremental-backups-tools" }, "release_url": "https://pypi.org/project/incremental-backups-tools/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "UNKNOWN", "version": "0.1.0" }, "last_serial": 808367, "releases": { "0.1.0": [] }, "urls": [] }