{ "info": { "author": "Antti Kaihola", "author_email": "antti.15+pgtricks@kaihola.fi", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: System Administrators", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 2 :: Only", "Topic :: Database", "Topic :: System :: Archiving :: Backup" ], "description": "==========\n pgtricks\n==========\n\nThis package contains two tools for backing up PostgreSQL database dumps.\n\n\npg_dump_splitsort\n=================\n\n``pg_dump_splitsort`` is a handy script for pre-processing PostgreSQL's\n``pg_dump`` output to make it more suitable for diffing and storing in version\ncontrol.\n\nUsage::\n\n pg_dump_splitsort .sql\n\nThe script splits the dump into the following files:\n\n| ``0000_prologue.sql``:\n everything up to the first COPY\n| ``0001_..sql``\n| :\n| :\n| ``NNNN_.
.sql``:\n COPY data for each table *sorted by the first field*\n| ``9999_epilogue.sql``:\n everything after the last COPY\n\nThe files for table data are numbered so a simple sorted concatenation of all\nfiles can be used to re-create the database::\n\n $ cat *.sql | psql \n\nI've found that a good way to take a quick look at differences between dumps is\nto use the `meld` tool on the whole directory::\n\n $ meld old-dump/ new-dump/\n\nStoring the dump in version control also gives a decent view on the\ndifferences. Here's how to configure git to use color in diffs::\n\n # ~/.gitconfig\n [color]\n diff = true\n [color \"diff\"]\n frag = white blue bold\n meta = white green bold\n commit = white red bold\n\n**Note:** If you have created/dropped/renamed tables, remember to delete all\n`.sql` files before post-processing the new dump.\n\n\npg_incremental_backup\n=====================\n\nThe ``pg_incremental_backup`` script\n\n- makes a database dump using ``pg_dump``\n- splits the dump into per-table files using ``pg_dump_splitsort``\n- creates or commits changes into a local Git repository containing the dump\n- pushes the changes to the remote repository\n\nUsage::\n\n pg_incremental_backup [-h] [--output-dir OUTPUT_DIR] database [remote]\n\n positional arguments:\n database\n remote\n\n optional arguments:\n -h, --help show this help message and exit\n --output-dir OUTPUT_DIR, -o OUTPUT_DIR", "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/akaihola/pgtricks", "keywords": "database postgresql backup git", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "pgtricks", "package_url": "https://pypi.org/project/pgtricks/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pgtricks/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/akaihola/pgtricks" }, "release_url": "https://pypi.org/project/pgtricks/0.9.1/", "requires_dist": null, "requires_python": null, "summary": "PostgreSQL utilities", "version": "0.9.1" }, "last_serial": 1456492, "releases": { "0.9.1": [ { "comment_text": "", "digests": { "md5": "e6df29f7c87d9b1d20ccd6cd63c2ada6", "sha256": "fcbb1aad08ef048cc860ab4e81490b6c4a5cc7d70fa9340e4fc46663aee1d58c" }, "downloads": -1, "filename": "pgtricks-0.9.1.tar.gz", "has_sig": false, "md5_digest": "e6df29f7c87d9b1d20ccd6cd63c2ada6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4178, "upload_time": "2015-03-10T21:34:30", "url": "https://files.pythonhosted.org/packages/48/6d/2443f76fd24860eed45140e4077968b8fd3666c0554355400a3ff618625b/pgtricks-0.9.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e6df29f7c87d9b1d20ccd6cd63c2ada6", "sha256": "fcbb1aad08ef048cc860ab4e81490b6c4a5cc7d70fa9340e4fc46663aee1d58c" }, "downloads": -1, "filename": "pgtricks-0.9.1.tar.gz", "has_sig": false, "md5_digest": "e6df29f7c87d9b1d20ccd6cd63c2ada6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4178, "upload_time": "2015-03-10T21:34:30", "url": "https://files.pythonhosted.org/packages/48/6d/2443f76fd24860eed45140e4077968b8fd3666c0554355400a3ff618625b/pgtricks-0.9.1.tar.gz" } ] }