{"id":17995638,"url":"https://github.com/deviantony/xtrabackup-scripts","last_synced_at":"2025-08-20T01:13:46.808Z","repository":{"id":10680360,"uuid":"12918691","full_name":"deviantony/xtrabackup-scripts","owner":"deviantony","description":"Wrapper scripts (Python) for the Percona Xtrabackup tool.","archived":false,"fork":false,"pushed_at":"2019-10-23T00:32:39.000Z","size":180,"stargazers_count":114,"open_issues_count":15,"forks_count":46,"subscribers_count":17,"default_branch":"develop","last_synced_at":"2025-08-17T00:35:41.168Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.percona.com/doc/percona-xtrabackup","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deviantony.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-18T09:08:17.000Z","updated_at":"2025-07-16T09:06:28.000Z","dependencies_parsed_at":"2022-09-10T04:04:02.464Z","dependency_job_id":null,"html_url":"https://github.com/deviantony/xtrabackup-scripts","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/deviantony/xtrabackup-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviantony%2Fxtrabackup-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviantony%2Fxtrabackup-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviantony%2Fxtrabackup-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviantony%2Fxtrabackup-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deviantony","download_url":"https://codeload.github.com/deviantony/xtrabackup-scripts/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deviantony%2Fxtrabackup-scripts/sbom","scorecard":{"id":337559,"data":{"date":"2025-08-11","repo":{"name":"github.com/deviantony/xtrabackup-scripts","commit":"7fe953bcadc371f970c9053e45c11371105bb39d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 2/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating deviantony/sandbox:ubuntu to deviantony/sandbox:ubuntu@sha256:da619e3334a1e853361e2c8d3848a81ad9ba1f464a4893594701f2cd9970d726","Warn: pipCommand not pinned by hash: Dockerfile:9","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'","Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T05:06:21.308Z","repository_id":10680360,"created_at":"2025-08-18T05:06:21.308Z","updated_at":"2025-08-18T05:06:21.308Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271248741,"owners_count":24726189,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-29T21:08:19.908Z","updated_at":"2025-08-20T01:13:46.757Z","avatar_url":"https://github.com/deviantony.png","language":"Python","readme":".. -*- 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\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\npyxtrabackup\n============\n\n``pyxtrabackup`` is a Python wrapper for the Percona Xtrabackup utility, see `official homepage \u003chttp://www.percona.com/software/percona-xtrabackup\u003e`_.\n\nThe tool allows you to take full and incremental backups using Xtrabackup.\n\nCall for maintainers\n====================\n\nThe author `deviantony \u003chttps://github.com/deviantony\u003e`_ currently doesn't actively use this tool and he's looking for awesome contributors to help maintain this project. Please don't hesitate to contact him directly or check the `issue #40 \u003chttps://github.com/deviantony/xtrabackup-scripts/issues/40\u003e`_ for more information.\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 \u003chttp://www.percona.com/doc/percona-xtrabackup/installation.html\u003e`_\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 \u003cPATH TO REPOSITORY\u003e --user=\u003cMYSQL USER\u003e [ --password=\u003cMYSQL PASSWORD\u003e ]\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 \u003cPATH TO REPOSITORY\u003e --user=\u003cMYSQL USER\u003e [ --password=\u003cMYSQL PASSWORD\u003e ]\n\nNow, you can start to add incremental backups to the cycle by using the *--incremental* option: ::\n\n$ pyxtrabackup-inc \u003cPATH TO REPOSITORY\u003e --incremental --user=\u003cMYSQL USER\u003e [ --password=\u003cMYSQL PASSWORD\u003e ]\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=\u003cPATH TO BASE BACKUP\u003e --incremental-archive=\u003cPATH TO INCREMENTAL BACKUP\u003e --user=\u003cMYSQL USER\u003e\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=\u003cPATH TO BASE BACKUP\u003e --incremental-archive=\u003cPATH TO INCREMENTAL BACKUP\u003e --user=\u003cMYSQL USER\u003e --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\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeviantony%2Fxtrabackup-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeviantony%2Fxtrabackup-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeviantony%2Fxtrabackup-scripts/lists"}