{ "info": { "author": "Anthony Lapenna", "author_email": "lapenna.anthony@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: System :: Archiving :: Backup" ], "description": ".. -*- restructuredtext -*-\n\n============\n\n.. image:: https://badges.gitter.im/Join%20Chat.svg\n :alt: Join the chat at https://gitter.im/deviantony/xtrabackup-scripts\n :target: https://gitter.im/deviantony/xtrabackup-scripts?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\npyxtrabackup\n============\n\n``pyxtrabackup`` is a Python wrapper for the Percona Xtrabackup utility, see `official homepage `_.\n\nThe tool allows you to take full and incremental backups using Xtrabackup.\n\nInstallation\n============\n\nUse ``pip`` to install it::\n\n $ pip install pyxtrabackup\n\n\nRequirements\n------------\n\nYou'll need to install Percona Xtrabackup on your system in order to use the tool.\n\nSee: `Installation documentation `_\n\nFull backup and restoration\n===========================\n\nBackup\n------\n\nThis tool can be used to create a backup of a local MySQL server. It will create a a compressed archive and move it into a timestamp named folder in the specified repository.\n\nYou will need a MySQL user with the appropriate permissions to create the backup, check the ``sql`` folder on the git repository for an example.\n\nExample of use::\n\n$ pyxtrabackup --user= [ --password= ]\n\nUsage in a cron file::\n\n@midnight mysql /usr/local/bin/pyxtrabackup /mnt/myrepo --user=backup-user --password=changeme\n\nAdditional options\n^^^^^^^^^^^^^^^^^^\n\nYou can also specify the following options:\n\n* --tmp-dir: Specify the temporary directory used by the script. (default: */tmp*).\n* --log-file: Log file for the script (default: */var/log/mysql/pyxtrabackup.log*).\n* --out-file: Log file for innobackupex output (default: */var/log/mysql/xtrabackup.out*).\n* --backup-threads: You can specify more threads in order to backup quicker (default: 1).\n* --no-compress: Do not compress the backup archive.\n* --webhook: URL to send a POST request after the backup is finished. Will send the *archive_path* and *archive_repository* in JSON.\n\nRestoration\n-----------\n\nThe archive is containing a binary backup of a MySQL server, all you need to do in order to restore the backup is to extract the content of the archive in your MySQL datadir, setup the permissions for the files and start your server.\n\n*Note*: If you are restoring a backup from another server, be sure that the server configuration of the new server is the same otherwise it could cause issues when trying to restart MySQL.\n\nStop the MySQL service first::\n\n$ sudo service MySQL stop\n\nClean the MySQL datadir::\n\n$ sudo rm -rf /path/to/mysql/datadir/*\n\nIf you compressed the archive, uncompress and extract it::\n\n$ sudo tar xvpzf /path/to/backup_archive.tar.gz -C /path/to/mysql/datadir\n\nOtherwise you just need to extract it::\n\n$ sudo tar xvpf /path/to/backup_archive.tar -C /path/to/mysql/datadir\n\nThen restart your MySQL server::\n\n$ sudo service mysql start\n\nSetup an incremental backup cycle\n=================================\n\nAn incremental backup cycle is consisting of a full binary backup (the base backup) and one or more incremental backups containing only the data difference between it and the last backup.\n\nSee `Wikipedia incremental backup`_ for more information.\n\nBackup\n------\n\nUse the *pyxtrabackup-inc* binary to create an incremental backup cycle.\n\nFirst you'll need to take a full backup which will serve as the base backup: ::\n\n$ pyxtrabackup-inc --user= [ --password= ]\n\nNow, you can start to add incremental backups to the cycle by using the *--incremental* option: ::\n\n$ pyxtrabackup-inc --incremental --user= [ --password= ]\n\nNOTE: The cycle will be reset every time a base backup is created (without the *--incremental* option).\n\nAdditional options\n^^^^^^^^^^^^^^^^^^\n\nYou can also specify the following options:\n\n* --tmp-dir: Specify the temporary directory used by the script. (default: */tmp*).\n* --log-file: Log file for the script (default: */var/log/mysql/pyxtrabackup-inc.log*).\n* --out-file: Log file for innobackupex output (default: */var/log/mysql/xtrabackup.out*).\n* --backup-threads: You can specify more threads in order to backup quicker (default: 1).\n* --no-compress: Do not compress the backup archives.\n\n\nRestoration\n-----------\n\n*WARNING*: The folder structure and the file names created by the *pyxtrabackup-inc* binary needs to be respected in order to restore successfully:\n\n * TIMESTAMP_FOLDER/INC/base_backup_DATETIME.tar(.gz)\n * TIMESTAMP_FOLDER/INC/inc_1_backup_DATETIME.tar(.gz)\n * TIMESTAMP_FOLDER/INC/inc_N_backup_DATETIME.tar(.gz)\n\nTo restore an incremental backup, you'll need to use the *pyxtrabackup-restore* binary the following way: ::\n\n$ pyxtrabackup-restore --base-archive= --incremental-archive= --user=\n\nAlso, if you did use the *--no-compress* option with the backup tools, you'll need to specify the *--uncompressed-archives* option: ::\n\n$ pyxtrabackup-restore --base-archive= --incremental-archive= --user= --uncompressed-archives\n\nThe binary will stop the MySQL service, remove all files present in MySQL datadir and import all the incremental backups up to the specified last incremental backup.\n\nFor example, using the following parameters: ::\n\n$ pyxtrabackup-restore --base-archive=/tmp/repo/20140518/INC/base_backup_20140518_1700.tar.gz --incremental-archive=/tmp/repo/20140518/INC/inc_backup_5_20140518_2200.gz --user=backup-user\n\nThe script will restore the inc_N_backup_DATETIME.tar.gz from 1 to 5.\n\nAdditional options\n^^^^^^^^^^^^^^^^^^\n\nYou can also specify the following options:\n\n* --data-dir: MySQL datadir. (default: */var/lib/mysql*)\n* --restart: Restart the MySQL service after restoration.\n* --tmp-dir: Specify the temporary directory used by the script. (default: */tmp*).\n* --log-file: Log file for the script (default: */var/log/mysql/pyxtrabackup-restore.log*).\n* --out-file: Log file for innobackupex output (default: */var/log/mysql/xtrabackup.out*).\n* --backup-threads: You can specify more threads in order to backup quicker (default: 1).\n* --uncompressed-archives: Do not try to uncompress backup archives. Use this option if you used the backup tool with --no-compress.\n\n\nDevelopment\n===========\n\nYou can use the Dockerfile to build a development environment container with all pre-requisites: ::\n\n$ docker build -t pyxtrabackup .\n\nThen you can use it to run the scripts: ::\n\n$ docker run --rm -it -v ${PWD}:/src pyxtrabackup zsh\n$ cd /src\n$ python xtrabackup/full_backup.py ...\n\n\nLimitations\n===========\n\nThis tool supports the following versions of Percona Xtrabackup:\n\n* 2.2.x\n\nIt has been tested on the following OSes:\n\n* Ubuntu 12.04\n* Ubuntu 14.04\n\nIt has been tested against the following MySQL versions:\n\n* 5.5\n\nIt has been tested against the following Python versions:\n\n* Python 3.4\n\n.. _Wikipedia incremental backup: http://en.wikipedia.org/wiki/Incremental_backup", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/deviantony/xtrabackup-scripts", "keywords": "mysql mariadb database backup percona xtrabackup", "license": "Apache License, Version 2.0", "maintainer": null, "maintainer_email": null, "name": "pyxtrabackup", "package_url": "https://pypi.org/project/pyxtrabackup/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyxtrabackup/", "project_urls": { "Homepage": "https://github.com/deviantony/xtrabackup-scripts" }, "release_url": "https://pypi.org/project/pyxtrabackup/3.1.6/", "requires_dist": null, "requires_python": null, "summary": "Percona Xtrabackup python wrapper", "version": "3.1.6" }, "last_serial": 2119302, "releases": { "3.0.0": [ { "comment_text": "", "digests": { "md5": "2d4265342612155c0ad4f273c47e5a5c", "sha256": "a2113d25aec5f7a84120fd52b51dfd43af5f47f11677a0f91367d730d676ae9e" }, "downloads": -1, "filename": "pyxtrabackup-3.0.0.tar.gz", "has_sig": false, "md5_digest": "2d4265342612155c0ad4f273c47e5a5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9479, "upload_time": "2015-01-12T11:10:32", "url": "https://files.pythonhosted.org/packages/bc/26/965ecf9f5abc7e1f14612f2633f4356c891285505f87b968cb381457a816/pyxtrabackup-3.0.0.tar.gz" } ], "3.0.0b1": [ { "comment_text": "", "digests": { "md5": "7cc41973e820aefb6f24c8ff0bf9f489", "sha256": "02af85a2096ee4b0b8cc4010077995d3524d1ada6bae8e6927ec2025fd5f6698" }, "downloads": -1, "filename": "pyxtrabackup-3.0.0b1.tar.gz", "has_sig": false, "md5_digest": "7cc41973e820aefb6f24c8ff0bf9f489", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5158, "upload_time": "2014-12-04T08:33:09", "url": "https://files.pythonhosted.org/packages/74/a5/d86daec8c7f03527f4332cfa78985dc6de5ad6ab0cee66537b6f233a681f/pyxtrabackup-3.0.0b1.tar.gz" } ], "3.0.0b2": [ { "comment_text": "", "digests": { "md5": "8715d61057a4994544823d22f3c3bf5b", "sha256": "4ac4324997507b97306ff7b59e7c1fbac3ea692f08cf1a0cd009cbad2141b8ec" }, "downloads": -1, "filename": "pyxtrabackup-3.0.0b2.tar.gz", "has_sig": false, "md5_digest": "8715d61057a4994544823d22f3c3bf5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9912, "upload_time": "2014-12-14T19:21:16", "url": "https://files.pythonhosted.org/packages/6f/4c/42d1d5602bb53aaecd439e4487ad5d8580da4f82689bbcf25f9dd00823c0/pyxtrabackup-3.0.0b2.tar.gz" } ], "3.0.0b3": [ { "comment_text": "", "digests": { "md5": "2e5c029cbf64918f90da5aeb1e84c523", "sha256": "d412ce3f2052feec7f02798d1aa6492cd3dc4d44e2e8570a795ae6093f94477c" }, "downloads": -1, "filename": "pyxtrabackup-3.0.0b3.tar.gz", "has_sig": false, "md5_digest": "2e5c029cbf64918f90da5aeb1e84c523", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9873, "upload_time": "2014-12-23T09:15:11", "url": "https://files.pythonhosted.org/packages/98/ee/a18c0bdc3f455e6a3542bd17b5be7b71cbb0886bf0faf1bff0eaf30d9639/pyxtrabackup-3.0.0b3.tar.gz" } ], "3.0.1": [ { "comment_text": "", "digests": { "md5": "c0c10e45a7d0a23c8301b9b15eee42f5", "sha256": "9db430451704af38cc8bf05d563abe866ff2550e16afcdefe8b872c870c7e004" }, "downloads": -1, "filename": "pyxtrabackup-3.0.1.tar.gz", "has_sig": false, "md5_digest": "c0c10e45a7d0a23c8301b9b15eee42f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9764, "upload_time": "2015-01-25T17:22:27", "url": "https://files.pythonhosted.org/packages/ba/1f/780a920e3a8a5502b4f49526408bf391f1401e9229dc67644f21194db004/pyxtrabackup-3.0.1.tar.gz" } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "5081b0292506c4fcecacb596f22d5fb3", "sha256": "c893b01ea4b3cd66c6e824607bc3faa9d13b0748443c9c271a3a792e14b7216d" }, "downloads": -1, "filename": "pyxtrabackup-3.1.0.tar.gz", "has_sig": false, "md5_digest": "5081b0292506c4fcecacb596f22d5fb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11047, "upload_time": "2015-04-22T14:22:02", "url": "https://files.pythonhosted.org/packages/c8/52/8be89ffe99efe52568d17ad99ae7c38154be0e977b69ccd659769d980e07/pyxtrabackup-3.1.0.tar.gz" } ], "3.1.1": [ { "comment_text": "", "digests": { "md5": "96e992940a4f2818f9b7b39394c4ee8d", "sha256": "e8a5657b8e3f7fc49e29da9d2c7d62d7e590b4ca3146e7d16abb11187a84520a" }, "downloads": -1, "filename": "pyxtrabackup-3.1.1.tar.gz", "has_sig": false, "md5_digest": "96e992940a4f2818f9b7b39394c4ee8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11064, "upload_time": "2015-04-23T09:29:34", "url": "https://files.pythonhosted.org/packages/9a/92/3a7ba67092a24935f9f8315bb387b46e89003664769cef4311c9077acc4a/pyxtrabackup-3.1.1.tar.gz" } ], "3.1.2": [ { "comment_text": "", "digests": { "md5": "fc553de5d6be3c0f1bf0900b5a307040", "sha256": "3074e7d67d4bf8b1909f912a29dbfd527bfa3de137d69015d8335617f4f6e1ce" }, "downloads": -1, "filename": "pyxtrabackup-3.1.2.tar.gz", "has_sig": false, "md5_digest": "fc553de5d6be3c0f1bf0900b5a307040", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11091, "upload_time": "2015-05-07T09:22:50", "url": "https://files.pythonhosted.org/packages/87/45/5bd7b5eeb0175276f2f14aa2bebfed58a8bbda534b6297de3815e8a25abe/pyxtrabackup-3.1.2.tar.gz" } ], "3.1.3": [ { "comment_text": "", "digests": { "md5": "ff7ffd9074c99428321073b3f6054243", "sha256": "09be27420d074e414f5a1a7b2231af167d4bda94f60a1db7bc1dcf3e68da87be" }, "downloads": -1, "filename": "pyxtrabackup-3.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "ff7ffd9074c99428321073b3f6054243", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16853, "upload_time": "2015-12-15T09:09:55", "url": "https://files.pythonhosted.org/packages/a2/99/b75e396f8a475db3a4f608062b264b2179e978fb8f596867e87dd20f69dd/pyxtrabackup-3.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7178175143a53cda5f105b2de378be82", "sha256": "d6a811040462ac8d5c16a1ed101d8822027d68767671ffcf92bad438ced25fd4" }, "downloads": -1, "filename": "pyxtrabackup-3.1.3.tar.gz", "has_sig": false, "md5_digest": "7178175143a53cda5f105b2de378be82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11773, "upload_time": "2015-12-15T09:10:09", "url": "https://files.pythonhosted.org/packages/04/2e/85ca5e61ade039e15ca6dd09bd2600512a36e8f7e29064c9355c83d9c95c/pyxtrabackup-3.1.3.tar.gz" } ], "3.1.4": [ { "comment_text": "", "digests": { "md5": "6be9f1d87a9d4b70f49c87de9d0f5070", "sha256": "9bd730525b708ac4ead1f13408c622620595bae8751d7f4076ed57e52e18224c" }, "downloads": -1, "filename": "pyxtrabackup-3.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "6be9f1d87a9d4b70f49c87de9d0f5070", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16851, "upload_time": "2015-12-15T09:59:02", "url": "https://files.pythonhosted.org/packages/b3/1e/205832c990a65c524713824f6e8b9a0486c05f9378912bbc5d432274fd49/pyxtrabackup-3.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3befd0c2c27a21f698011253cf658bbe", "sha256": "aae9ce761b546b14f5e83268651744314aa79070d6b4a5da9f9f4ec2f2fb00f0" }, "downloads": -1, "filename": "pyxtrabackup-3.1.4.tar.gz", "has_sig": false, "md5_digest": "3befd0c2c27a21f698011253cf658bbe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11783, "upload_time": "2015-12-15T09:59:08", "url": "https://files.pythonhosted.org/packages/c2/e3/23ec7b41288efaef1eb5c4f3e17869f732efc3162d48e8b6fdf625ccd56e/pyxtrabackup-3.1.4.tar.gz" } ], "3.1.5": [ { "comment_text": "", "digests": { "md5": "d3db05f39d2025cf9c93276608eaaa01", "sha256": "c756e7ee28fb8af1635e758b6e3b8d96e4c8ac306b2678ef79283ab41620908f" }, "downloads": -1, "filename": "pyxtrabackup-3.1.5.tar.gz", "has_sig": false, "md5_digest": "d3db05f39d2025cf9c93276608eaaa01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11715, "upload_time": "2016-03-23T06:57:40", "url": "https://files.pythonhosted.org/packages/a7/be/b38fd8bf9c17fb092942a681bf35ebeadcd92dbfa38c4aa3d8d2e23bfd08/pyxtrabackup-3.1.5.tar.gz" } ], "3.1.6": [ { "comment_text": "", "digests": { "md5": "6679123ffadd6e99b01e44874abb56fb", "sha256": "bd218b3a040d199668bfd0104352da1506c00d7eb8329f426d352ec6a2ee3753" }, "downloads": -1, "filename": "pyxtrabackup-3.1.6.tar.gz", "has_sig": false, "md5_digest": "6679123ffadd6e99b01e44874abb56fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11684, "upload_time": "2016-05-17T07:07:18", "url": "https://files.pythonhosted.org/packages/ea/dd/365b737ae2039330dc9b622a8a23608e3389611e649805d681c7e4447853/pyxtrabackup-3.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6679123ffadd6e99b01e44874abb56fb", "sha256": "bd218b3a040d199668bfd0104352da1506c00d7eb8329f426d352ec6a2ee3753" }, "downloads": -1, "filename": "pyxtrabackup-3.1.6.tar.gz", "has_sig": false, "md5_digest": "6679123ffadd6e99b01e44874abb56fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11684, "upload_time": "2016-05-17T07:07:18", "url": "https://files.pythonhosted.org/packages/ea/dd/365b737ae2039330dc9b622a8a23608e3389611e649805d681c7e4447853/pyxtrabackup-3.1.6.tar.gz" } ] }