[code] XtraBackup Automation in python

Hello All!

I want to start by saying thank you for this tool. XtraBackup is great- we use it multiple times per day across several servers reliably. Where would I be without y’all!? In that vein I wanted to contribute back so I wrote a fairly straight forward but hopefully useful python program to automate MySQL backups using XtraBackup.

Here is a link to the github [GitHub - phildoesdev/xtrabackupautomator: Automates Percona's XtraBackup] with a run-down in the readme! This is my first open source project so if anyone has any questions, feedback, or suggestions I’d love to hear them!

Thanks again, Percona!


1 Like



The intention of this project is to automate Percona’s XtraBackup in a way that is easy to understand and manipulate. ‘XtraBackupAutomation’ is a simple program that allows for the scheduling of MySQL backups using systemd and Percona’s XtraBackup tool. It also allows automatic archiving of these backups.

This is my first open source project, and I am looking forward to contributing back to the community. Constructive feedback and feature requests are welcome as I hope to maintain a useful piece of software for everyone to use.



  • Scheduled Percona’s XtraBackups for MySQL using systemd services and timers
  • Automatic backup archival using python’s shutil.make_archive
  • Robust configuration intended to give users the ability to enable/disable features, change file locations, and create the program they need with ease
  • Easy to read, well commented, one file implementation


Developed On

  • OS:
    • Debian GNU/Linux 10 (buster)
  • Python Version:
    • Python 3.10.4
  • Python Packages
    • Name: pexpect, Version: 4.8.0
  • Percona XtraBackup Version:
    • XtraBackup version 8.0.28-21 based on MySQL server 8.0.28 Linux (x86_64)
  • MySQL
    • MySql Ver 8.0.28 for Linux on x86_64 (MySQL Community Server - GPL)

Required Python Libraries

  • pexpect

Required Files

  • xtrabackupautomator.py
  • xtrabackupautomator.service
  • xtrabackupautomator.timer

More information at GitHub - phildoesdev/xtrabackupautomator: Automates Percona's XtraBackup

1 Like

Hi @phildoes

I want to invite you to write a post about your tool for our Community Blog

You can write something like How to or explain the pros and cons or features of your tool

Here are detailed instructions on how to publish a post using GitHub.

We’ve also added a link to your tool on our website to the Repositories and Artifacts section.

1 Like